Lingo.dev + .json (Frontend)
Lingo.dev CLI translates JSON locale files for React, Vue, Angular, and any frontend framework with zero configuration changes. The CLI preserves exact JSON formatting, handles nested structures intelligently, processes only modified content for cost efficiency, and maintains framework-specific syntax like {{count}}
placeholders.
Quick Setup
Create an i18n.json
configuration file:
{
"locale": {
"source": "en",
"targets": ["es", "fr", "de"]
},
"buckets": {
"json": {
"include": ["locales/[locale].json"]
}
}
}
Reminder: [locale]
is a placeholder that should remain in the config literally, as it's replaced with the actual locale during CLI run.
Translate Everything
npx lingo.dev@latest i18n
Automatically processes nested structures, preserves framework-specific syntax like {{count}}
placeholders, and updates only changed content.
Smart Structure Preservation
Maintains complex hierarchies and framework conventions:
{
"nav": {
"home": "Home",
"about": {
"team": "Our Team"
}
},
"items": {
"one": "{{count}} item",
"other": "{{count}} items"
}
}
Advanced Configuration
Exclude Files
"json": {
"include": ["locales/[locale]/*.json"],
"exclude": ["locales/[locale]/config.json"]
}
Lock Technical Keys
"json": {
"lockedKeys": ["app/version", "settings/apiKey"]
}
Use forward slash (/
) for nested key paths.