TypeScript
NeoIQ Localize supports TypeScript localization files with full type safety. This format extends JavaScript support with additional TypeScript-specific features and type generation capabilities.
Setting Up
First, make sure you've got a neoiq-localize.json config file in your project root. Here's an example:
Translating
With your config set, run:
When you run this command, NeoIQ Localize will:
- Load your source TypeScript files (e.g., src/locales/en.ts)
- Detect any new or modified translation strings
- Generate translations for your target languages
- Create or update the target language files (e.g., src/locales/sv.ts)
- Preserve type annotations and interfaces
- Handle nested objects with proper typing
- Maintain code formatting and documentation comments
- Support literal types and union types
How is this guide?
Edit on GitHub
Last updated on