Chrome Messages (json)
Chrome Extension localisation uses a messages.json file with a structure defined by the Chrome extension manifest format. Chrome loads locale files from a _locales directory: _locales/en/messages.json for English, _locales/fr/messages.json for French. The chrome.i18n API provides runtime access to messages, and the manifest.json description and permissions are also localised through this system.
Each entry in messages.json is a named object where the key is the message identifier. The object must contain a message property with the string value. An optional description property provides translator context. Placeholders are defined as nested objects with content properties, and the message value refers to them using dollar-sign identifiers. The Chrome i18n system substitutes placeholder content at runtime.
Best practice: write a description for every message entry — Chrome's format has first-class support for translator descriptions, and Language Monster surfaces these during translation. Define placeholders explicitly rather than constructing strings through concatenation. Keep message identifiers prefixed by the extension feature area for clarity. Language Monster supports Chrome Messages format natively, preserves the messages.json structure and placeholder definitions, and pushes completed files to the correct _locales directories.
