0.3.1 • Published 4 years ago

localyze v0.3.1

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

localyze

minimalist localization tool for both node.js and browser

supports multifile translation and model diff

new Localyze({
    language: 'pt-br',
    model: 'model.json',
    translation: {
        'pt-br': ['pt-br/login.json', 'pt-br/home.json'],
        'es-esp': ['es-esp/login.json', 'es-esp/home.json']
    },
    ready: ({ localyze }) => {
        console.log(localyze`input.invalid`);
        console.log(localyze('input.valid', 'lower')); // toLowerCase
        console.log(localyze('input.warning', 'upper')); // toUpperCase
        console.log(localyze('input.error', 'capitalize')); // Capitalize
        console.log(localyze('input.error', 'title')); // Capitalize Every Word
    }
});
  • Add new file to translation:
localyze.addTranslationFile('pt-br', 'pt-br/dashboard.json', (success) => {
    console.log(success);
});
0.3.1

4 years ago

0.3.0

4 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago