📖 Text Localizer
Tutorial
Tutorial can be found here.
Usage
import { TextLocalizer } from 'text-localizer';
import { fetchItTranslations } from './l10n/it';
(async () => {
const localizer = new TextLocalizer({
us: import('./l10n/us.json'),
gb: import('./l10n/gb'),
it: fetchItTranslations,
});
await localizer.setOptions({
language: 'gb',
});
const translations = localizer.translations;
console.log(translations.question);
console.log(
localizer.formatTranslation(translations.help, { topic: 'Text Localizer' })
);
})();
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT