Lightweight localization solution using JSON format
Create your locales in a JSON file e.g. locales.json:
{
"brazil":{
"br": "Brasil",
"de": "Brasilien",
"en": "Brazil"
},
"greeting":{
"br": "Oi {0}.",
"de": "Hallo {0}.",
"en": "Hello {0}."
}
}
Syntax in CoffeeScript
L.changeLocale "en"
L.initFile "locales.json", ->
console.log L.get("brazil") # will output "Brazil"
console.log L.get("greeting", "Dude") # will output "Hello Dude."
Unit tests are build on top of Mocha and should:
$ make test
Docs are generated using docco and Pygments.
$ sudo easy_install Pygments
$ make docs