Skip to content

Locale Formats

i18n Ally Next supports multiple locale file formats through its parser system.

Supported Formats

FormatExtensionsParser ID
JSON.jsonjson
JSON5.json5json5
YAML.yml, .yamlyaml
JavaScript.js, .cjs, .mjsjs
TypeScript.ts, .cts, .mtsts
INI / Properties.ini, .propertiesini / properties
PO (Gettext).popo
PHP.phpphp
Fluent.ftlftl

Enable Specific Parsers

By default, the extension enables parsers based on the detected framework. You can override this:

jsonc
// .vscode/settings.json
{
  "i18n-ally-next.enabledParsers": ["json", "yaml"]
}

Extend File Extensions

Map custom file extensions to existing parsers:

jsonc
{
  "i18n-ally-next.parsers.extendFileExtensions": {
    "lang": "json"
  }
}

This maps .lang files to the JSON parser.

Parser Options

jsonc
{
  // Indentation size for writing locale files
  "i18n-ally-next.indent": 2,

  // Tab style: "space" or "tab"
  "i18n-ally-next.tabStyle": "space",

  // File encoding
  "i18n-ally-next.encoding": "utf-8",

  // Sort keys when writing
  "i18n-ally-next.sortKeys": true,

  // Sort comparison method: "binary" or "locale"
  "i18n-ally-next.sortCompare": "binary"
}

Released under the MIT License.