TypeScript TS Free
ByCrowdinVerified Author

TypeScript TS file localization

Try Crowdin

TypeScript TS translation with Crowdin

Copy link

TypeScript TS is a natively supported file format, you can use it without an additional installation. Just upload it to your projects and start the localization.

File Format Details

Copy link
Attribute Value
File Extension .ts
API Type ts
Source can be edited in Crowdin No
Generating translated files via Bundles Search Crowdin Store
Supports pluralization No
WYSIWYG Preview in the editor No
Supported types of contextual information Text comments, Screenshots, In-Context
Custom attributes No
Existing translations import possibility Key-value mapping

Support for Const Assertions

Copy link

Crowdin supports localization of TypeScript files that use const assertions. This approach allows you to create immutable key-value objects, commonly used for defining translation resources.

Usage Example

Copy link

Below is a sample file using as const to define translation keys and values. These constants can be uploaded to Crowdin for localization, and downloaded as translated files when your project is ready.

const root = {
  get_started: 'Get started',
  app_title: 'Next.js with next-intl and Crowdin',
  app_description: 'Generated by create-next-app to experiment with next-intl and Crowdin',
  hello__name: 'Hello {name}',
} as const;
export default root;

Notes

Copy link
  • as const ensures the object is readonly, preserving exact string values for localization.
  • Crowdin detects these structures automatically and processes them as key-value pairs.

Sample File

Copy link
export enum EncounterIcons {
    disrespected = "encounter-disrespected",
    textInDoubleQuotes = "Text in double qoutes",
    textInSingleQoutes = 'Text in single qoutes',
    emptyTextInDoubleQuotes = "",
    emptyTextInSingleQoutes = '',
    textWithPlaceHolder = "{0} (text with placeholder)",
    textWithEscapedQuotesInDoubleQuotes = "\"this is a text\"",
    textWithEscapedQuotesInSingleQuotes = '\'this is a text\'',
    someChineseHierogliphs = '(原币)',
    format = "d/m/Y",
    bool = true,
    integer = 42,
    float = 3.14,
    regex = /^([\d]{4})$/,
}

Crowdin is a platform that helps you manage and translate content into different languages. Integrate Crowdin with your repo, CMS, or other systems. Source content is always up to date for your translators, and translated content is returned automatically.

Learn More
Categories
File Formats
Works with
  • Crowdin Enterprise
  • crowdin.com
Details

Released on May 16, 2022

Updated on Mar 21, 2025

Published by Crowdin

Identifier:ts

TypeScript TS file localization