Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/anykeyh/simple-i18n-javascript

Very simple internationalization system for javascript.
https://github.com/anykeyh/simple-i18n-javascript

Last synced: 11 days ago
JSON representation

Very simple internationalization system for javascript.

Awesome Lists containing this project

README

        

# simple-i18n-javascript
Very simple internationalization system for javascript.

```javascript
//Set a key:
I18n.add {
fr: {
path: {
to: {
key: "Hello :)"
}
}
}
}

//Set a locale (default=en)
I18n.locale = 'fr'

//Get a key
I18n("path.to.key")

//With default value:
I18n("path.to.otherkey", "not found")

```

Yeah that's simple.

# TODO:

Adding the cultural stuff (ex: en-UK / en-US )