Skip to content

Supported Locale Formats

Anthony Fu edited this page Apr 15, 2020 · 5 revisions
Format Read Write Annotations Note
JSON βœ… βœ… βœ…
YAML βœ… βœ… βœ… Comments will NOT be preserved*
JSON5 βœ… βœ… ❌ Comments will NOT be preserved*
INI βœ… βœ… ❌ Comments will NOT be preserved*
POT βœ… βœ… ❌
JavaScript βœ… ❌ ❌ Read-only
TypeScript βœ… ❌ ❌ Read-only
PHP βœ… ❌ ❌ Read-only

* Due to the limitation of yaml.dumps(#196) and JSON5.stringify(#177), comments in YAML and JSON5 will be OMITTED on any modification by this extension (editing, translating, etc). If you are using comments in your locale files, you can turn on read-only mode by i18n-ally.readonly to prevent losing comments.

By default, formats support will be automatically enabled by the activated frameworks(e.g Larval will enable php support).

To manually choose enabled formats:

// other formats will be disabled regardless the framework preference.
"i18n-ally.enabledParsers": ["js", "ts", "pot"]

πŸ’‘ From v2.0, formats other than JSON, YAML and JSON5 would be disabled by default.