Languine supports TypeScript localization files with full type safety. This format extends JavaScript support with additional TypeScript-specific features and type generation capabilities.
First, make sure you've got a languine.json config file in your project root. Here's an example:
{ "locale": { "source": "en", "targets": ["sv", "de", "fr"] }, "files": { "ts": { "include": ["src/locales/[locale].ts"] } } }
With your config set, run:
npx languine@latest translate
When you run this command, Languine will: