{"library":"messageformat-convert","title":"messageformat-convert","description":"Convert input formats (e.g., Rails i18n YAML) into messageformat-compatible JSON. Version 0.4.0 is the latest stable release. The package is part of the messageformat ecosystem but has seen no recent updates or releases. It supports Node.js >=6.0 and converts Rails-style nested key-value pairs into flat message format strings. Note that this package does not handle MessageFormat 2.0 (MF2) syntax, only the legacy ICU MessageFormat format used by messageformat 2.x and 3.x.","language":"javascript","status":"maintenance","last_verified":"Fri May 01","install":{"commands":["npm install messageformat-convert"],"cli":null},"imports":["import { convert } from 'messageformat-convert'","import convert from 'messageformat-convert'","import convert from 'messageformat-convert'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import convert from 'messageformat-convert';\nimport yaml from 'js-yaml';\nimport fs from 'fs';\n\nconst railsI18n = yaml.load(fs.readFileSync('config/locales/en.yml', 'utf8'));\n// railsI18n might be: { en: { greeting: 'Hello', farewell: 'Goodbye' } }\nconst mfData = convert(railsI18n.en);\nconsole.log(mfData);\n// Output: { greeting: 'Hello', farewell: 'Goodbye' }","lang":"typescript","description":"Shows how to convert Rails i18n YAML to messageformat-compatible JSON using import syntax.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}