Supported Locales

Lingo.dev CLI supports locale codes following international standards for language identification. You can use simple language codes, regional variants, and platform-specific formats in your i18n.json configuration.

The CLI accepts locale codes in multiple formats to accommodate different project requirements and platform conventions.

Locale Code Formats

Lingo.dev CLI supports several locale code formats:

Simple language codes (ISO 639-1):

{
  "locale": {
    "source": "en",
    "targets": ["es", "fr", "de", "ja", "zh"]
  }
}

Regional variants (BCP 47):

{
  "locale": {
    "source": "en-US",
    "targets": ["en-GB", "es-ES", "es-419", "fr-FR", "fr-CA"]
  }
}

Platform-specific formats:

{
  "locale": {
    "source": "en",
    "targets": ["en-rUS", "es-rES", "pt-rBR"]
  }
}

Checking Supported Locales

To see all available locale codes, use the CLI commands:

List supported source languages:

npx lingo.dev@latest show locale sources

List supported target languages:

npx lingo.dev@latest show locale targets

These commands display the complete list of locale codes you can use in your configuration.

Common Locale Examples

Major languages:

  • en - English
  • es - Spanish
  • fr - French
  • de - German
  • ja - Japanese
  • zh - Chinese
  • ko - Korean
  • pt - Portuguese
  • it - Italian
  • ru - Russian

Regional variants:

  • en-US - English (United States)
  • en-GB - English (United Kingdom)
  • es-ES - Spanish (Spain)
  • es-419 - Spanish (Latin America)
  • fr-FR - French (France)
  • fr-CA - French (Canada)
  • zh-CN - Chinese (Simplified)
  • zh-TW - Chinese (Traditional)

Regional Variants

Regional variants allow you to target specific markets with localized content that accounts for cultural and linguistic differences within the same language.

Configuration example:

{
  "locale": {
    "source": "en-US",
    "targets": ["en-GB", "es-ES", "es-419", "pt-BR", "pt-PT"]
  }
}

Generated file structure:

locales/
  en-US.json    (source)
  en-GB.json    (British English)
  es-ES.json    (Spanish Spain)
  es-419.json   (Latin American Spanish)
  pt-BR.json    (Brazilian Portuguese)
  pt-PT.json    (European Portuguese)

Each regional variant receives translations optimized for that specific market's terminology and cultural context.

Latin American Spanish (es-419) covers Spanish-speaking countries in Latin America with terminology and expressions that work across the region, rather than being specific to individual countries.

Platform-Specific Formats

Some platforms use different locale code conventions. Lingo.dev CLI supports these formats:

Android resource directories:

{
  "locale": {
    "source": "en",
    "targets": ["es-rES", "pt-rBR", "zh-rCN"]
  },
  "buckets": {
    "android": {
      "include": ["android/values-[locale]/strings.xml"]
    }
  }
}

iOS Localizable.strings:

{
  "locale": {
    "source": "en",
    "targets": ["es", "pt-BR", "zh-Hans"]
  },
  "buckets": {
    "xcode-strings": {
      "include": ["ios/[locale].lproj/Localizable.strings"]
    }
  }
}

Script Variants

For languages with multiple writing systems, use script codes:

  • zh-Hans - Chinese (Simplified script)
  • zh-Hant - Chinese (Traditional script)
  • sr-Cyrl - Serbian (Cyrillic script)
  • sr-Latn - Serbian (Latin script)

Configuration example:

{
  "locale": {
    "source": "en",
    "targets": ["zh-Hans", "zh-Hant", "sr-Cyrl", "sr-Latn"]
  }
}

Adding New Locales

Lingo.dev CLI currently supports 80+ locales and we add support for new ones quickly after community requests.

If your required locale code isn't supported, you can request it by opening an issue in the Lingo.dev CLI repository. Most requests are implemented and released within days.