Export Translations
LangCTL exports translations in six different formats, automatically converting parameter syntax to match your platform’s requirements.
Supported Export Formats
| Format | Platforms | Parameter Syntax | File Extension |
|---|---|---|---|
| i18next | React, Vue, Angular, Node.js | {{param}} | .json |
| Android XML | Android (native) | %1$s, %2$d | .xml |
| iOS Strings | iOS/macOS (native) | %@, %1$@ | .strings |
| Flutter ARB | Flutter | {param} | .arb |
| Flat JSON | Generic | {{param}} | .json |
| Nested JSON | Generic | {{param}} | .json |
Quick Export
From Dashboard
- Navigate to Export section
- Select project
- Choose export options:
- Language: Which language to export
- Format: Target platform format
- Include: Published only or all keys
- Module: Optional module filter
- Click “Export”
- Download generated file
[IMAGE: export-interface.png - Screenshot of export configuration interface]
Export Formats Explained
i18next JSON
The most common format for web frameworks:
{
"home": {
"welcome": "Welcome, {username}!",
"subtitle": "Get started with {appName}"
},
"auth": {
"login": {
"title": "Sign In",
"button": "Log in"
}
}
} Usage:
t('home.welcome', { username: 'John' })
// Output: "Welcome, John!" Android XML
Native Android strings format:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="home.welcome">Welcome, %1$s!</string>
<string name="home.subtitle">Get started with %1$s</string>
<string name="notification.count">You have %1$d new messages</string>
</resources> Usage:
getString(R.string.home_welcome, username)
getString(R.string.notification_count, count)
LangCTL automatically converts {{param}} to positional %1$s, %2$s based on parameter order in your key.
iOS Strings
Native iOS/macOS localization format:
/* Main welcome message */
"home.welcome" = "Welcome, %@!";
/* Notification counter */
"notification.count" = "You have %1$@ new messages";
/* Multi-parameter example */
"user.greeting" = "Hello, %1$@! You have %2$@ notifications"; Usage:
String(format: NSLocalizedString("home.welcome", comment: ""), username)
String(format: NSLocalizedString("notification.count", comment: ""), count)
Flutter ARB
Application Resource Bundle for Flutter:
{
"home_welcome": "Welcome, {username}!",
"@home_welcome": {
"description": "Main welcome message",
"placeholders": {
"username": {
"type": "String"
}
}
},
"notification_count": "You have {count} new messages",
"@notification_count": {
"description": "Notification counter",
"placeholders": {
"count": {
"type": "int"
}
}
}
} Usage:
AppLocalizations.of(context)!.homeWelcome(username)
Flat JSON
Simple key-value pairs:
{
"home.welcome": "Welcome, {username}!",
"home.subtitle": "Get started with {appName}",
"auth.login.title": "Sign In",
"auth.login.button": "Log in",
"notification.count": "You have {count} new messages"
} Best for custom implementations or frameworks without nested structure support.
Hierarchical structure based on key names:
{
"home": {
"welcome": "Welcome, {username}!",
"subtitle": "Get started with {appName}"
},
"auth": {
"login": {
"title": "Sign In",
"button": "Log in"
}
},
"notification": {
"count": "You have {count} new messages"
}
} Same as i18next format, useful for general-purpose JSON-based systems.
Enabled (default):
- Exports only keys marked as “published”
- Recommended for production deployments
- Ensures quality-checked translations
Disabled:
- Exports all keys including drafts
- Useful for development/testing
- Shows work-in-progress translations
Always use “Published Only” for production builds. Use all keys for development to see drafts.
Export only specific modules:
- Check “Filter by Module”
- Select module(s) from dropdown
- Export will include only keys from selected modules
Use cases:
- Export only “auth” module for login flow
- Export “marketing” module for landing pages
- Split large projects into manageable chunks
langctl export my-app -l en -f i18next --module auth
langctl export my-app -l en -f i18next --module auth,dashboard Export one language at a time:
- Choose from project’s configured languages
- Each export generates a single-language file
- Run multiple exports for multi-language apps
For multi-language exports, use the CLI or run multiple exports through the dashboard.
LangCTL automatically converts parameter syntax:
"Welcome, {{username}}! You have {{count}} messages." i18next/JSON:
"Welcome, {{username}}! You have {{count}} messages." Android XML:
<string name="message">Welcome, %1$s! You have %2$d messages.</string> iOS Strings:
"Welcome, %1$@! You have %2$@ messages." Flutter ARB:
"Welcome, {username}! You have {count} messages." For Android and iOS, parameters are converted in the order they appear. Always use consistent parameter names and order.
From the dashboard:
- Go to Export section
- Click “Batch Export”
- Select multiple languages
- Choose format
- Click “Export All”
- Download ZIP file with all languages
[IMAGE: batch-export.png - Screenshot of batch export interface]
Organization-level export:
- Go to Settings > Export
- Click “Export Organization”
- Downloads ZIP with all projects and languages
Automatically commit exports to your repository:
- Connect GitHub/GitLab account
- Configure repository and branch
- Set export path (e.g.,
src/locales/) - Enable auto-export on publish
Current manual process:
langctl export my-app -l en -f i18next -o ./locales/en.json
langctl export my-app -l es -f i18next -o ./locales/es.json
git add locales/*.json
git commit -m "Update translations"
git push Exported files follow these conventions:
| Format | File Name |
|---|---|
| i18next | {language}.json (e.g., en.json) |
| Android XML | strings.xml (in values-{language}/ folder) |
| iOS Strings | Localizable.strings (in {language}.lproj/ folder) |
| Flutter ARB | app_{language}.arb (e.g., app_en.arb) |
| JSON | {language}.json |
The dashboard export provides the file content. Use the CLI for automatic file naming and directory structure.
Transform keys during export (CLI only):
# Convert dots to underscores
langctl export my-app -l en --transform underscore
langctl export my-app -l en --transform uppercase
langctl export my-app -l en --transform strip-module Add metadata to exports:
{
"_metadata": {
"language": "es",
"exported_at": "2024-04-15T10:30:00Z",
"project": "my-app",
"version": "1.0",
"keys_count": 250
},
"home.welcome": "¡Bienvenido!",
...
} Always export fresh translations before deploying:
- name: Export Translations
run: |
langctl export my-app -l en -f i18next -o ./src/locales/en.json
langctl export my-app -l es -f i18next -o ./src/locales/es.json
- name: Build Application
run: npm run build
- name: Deploy
run: npm run deploy Version Control Your Exports
Commit exported files to git:
- Track translation changes over time
- Enable rollbacks if needed
- Review translation updates in PRs
- Ensure consistency across environments
Test After Export
Always test exported translations:
- Run exports to local environment
- Test in development mode
- Check for missing keys
- Verify parameter replacement
- Test in actual app UI
Use Published Only in Production
Development: Export all keys (including drafts)
Staging: Export published keys
Production: Export published keys only
Troubleshooting
Export File is Empty
Common causes:
- No published keys (enable “Include Drafts”)
- Module filter excludes all keys
- Language not configured in project
- All keys are soft-deleted
Parameters Not Converting
If {{param}} appears instead of platform syntax:
- Check format selection (might be JSON)
- Verify parameter syntax in source
- Try re-exporting
- Report issue to support
Keys Missing from Export
Check:
- Published status (disable “Published Only”)
- Module filter settings
- Language has translations for those keys
- Keys not soft-deleted
Invalid XML/Format Error
For Android XML exports:
- Check for special characters (”, ’, <, >, &)
- Verify key names are valid XML
- Look for newlines in values
- Try flat JSON first to debug
Next Steps
- Import Translations - Import existing translation files
- Platform Integrations - Set up in your app
- CI/CD Integration - Automate exports
- Export Formats Reference - Detailed format specs