Get Started

Export Translations

LangCTL exports translations in six different formats, automatically converting parameter syntax to match your platform’s requirements.

Supported Export Formats

FormatPlatformsParameter SyntaxFile Extension
i18nextReact, Vue, Angular, Node.js{{param}}.json
Android XMLAndroid (native)%1$s, %2$d.xml
iOS StringsiOS/macOS (native)%@, %1$@.strings
Flutter ARBFlutter{param}.arb
Flat JSONGeneric{{param}}.json
Nested JSONGeneric{{param}}.json

Learn more about formats ->

Quick Export

From Dashboard

  1. Navigate to Export section
  2. Select project
  3. Choose export options:
    • Language: Which language to export
    • Format: Target platform format
    • Include: Published only or all keys
    • Module: Optional module filter
  4. Click “Export”
  5. Download generated file

[IMAGE: export-interface.png - Screenshot of export configuration interface]

Export Formats Explained

i18next JSON

The most common format for web frameworks:

i18next format (nested)
{
"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:

Android strings.xml
<?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)
ℹ️
Note

LangCTL automatically converts &#123;&#123;param&#125;&#125; to positional %1$s, %2$s based on parameter order in your key.

iOS Strings

Native iOS/macOS localization format:

Localizable.strings
/* 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:

app_en.arb
{
"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:

en.json (flat)
{
"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:

en.json (nested)
{
"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
💡
Tip

Always use “Published Only” for production builds. Use all keys for development to see drafts.

Export only specific modules:

  1. Check “Filter by Module”
  2. Select module(s) from dropdown
  3. 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
CLI module filtering
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
ℹ️
Note

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."
⚠️
Parameter Order

For Android and iOS, parameters are converted in the order they appear. Always use consistent parameter names and order.

From the dashboard:

  1. Go to Export section
  2. Click “Batch Export”
  3. Select multiple languages
  4. Choose format
  5. Click “Export All”
  6. Download ZIP file with all languages

[IMAGE: batch-export.png - Screenshot of batch export interface]

Organization-level export:

  1. Go to Settings > Export
  2. Click “Export Organization”
  3. Downloads ZIP with all projects and languages

Automatically commit exports to your repository:

  1. Connect GitHub/GitLab account
  2. Configure repository and branch
  3. Set export path (e.g., src/locales/)
  4. 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:

FormatFile Name
i18next&#123;language&#125;.json (e.g., en.json)
Android XMLstrings.xml (in values-&#123;language&#125;/ folder)
iOS StringsLocalizable.strings (in &#123;language&#125;.lproj/ folder)
Flutter ARBapp_&#123;language&#125;.arb (e.g., app_en.arb)
JSON&#123;language&#125;.json
💡
Tip

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:

JSON with metadata
{
"_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:

.github/workflows/deploy.yml
- 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:

  1. Run exports to local environment
  2. Test in development mode
  3. Check for missing keys
  4. Verify parameter replacement
  5. 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 &#123;&#123;param&#125;&#125; 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