stefanyohansson / sz-i18n Goto Github PK
View Code? Open in Web Editor NEWInternationalization library. Easy and Fast. :zap:
Internationalization library. Easy and Fast. :zap:
today we have this usage below, but user needs to provide all arguments every time and sometimes this is a annoying task. I think lib can load from a config file [too].
Usage:
sz-i18n export <source> -o <dest> -t <langs>
sz-i18n import <source> -b <base> -o <dest> [-t <langs>]
sz-i18n generate
sz-i18n -h | --help | --version
This api seems to be really useful when working with template engines like mustache, underscore template...
Example:
var ts = i18n.translate_object('LANG', { 'x' : value_x, 'y': value_y });
-> {
'x': 'translated_value_x',
'y': 'translated_value_y',
}
var tmpl = _.template(...);
tmpl.render(ts);
Generate a source map file with:
file+line: string
We'll generate a source map in extractor this way we can export translator strings for each source file.
Make a sz-i18n command for extract i18n strings from source code.
sz-i18n extract <source_folder> <dest_folder> -t <langs>
example:
sz-i18n extract src/ lang/ -t 'en-US,pt-BR'
We need to run in CommonJS enviroments too.
It's nice to add source lang example just by running:
sz-cli generate en-US [--empty]
My proposal to use pure JS instead of coffee script.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.