strong-globalize is built on Unicode CLDR and jquery/globalize and implements automatic extraction of strings from JS source code and HTML templates, lint the string resource, machine-translate them in seconds. In runtime, it loads locale and string resource into memory and provides a hook to persistent logging.
const {_} = require('strong-globalize')();
const name = 'world';
console.log(_`Hello ${name}`);
Preliminary list of tasks:
[ ] When gathering strings to potentially localize, look for template literals and convert them into messages with indexed placeholders. In the example above, the following messages entry should be created: Hello {0}
[ ] Implement _ as a tag function applying localization under the hood.
Extend strong-globalize to support template literals via tagged template literals.
Sample usage:
Preliminary list of tasks:
messages
entry should be created:Hello {0}
_
as a tag function applying localization under the hood.