Languine supports JavaScript/TypeScript localization files, perfect for modern web applications. This format handles both object literals and module exports, supporting nested structures and dynamic content.
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": { "js": { "include": ["src/locales/[locale].js"] } } }
With your config set, run:
npx languine@latest translate
When you run this command, Languine will: