-
Notifications
You must be signed in to change notification settings - Fork 1
Translations
Beecher edited this page Sep 29, 2015
·
4 revisions
- tries to grab the
"lang"property from the<html>tag (defaults to "en").- see ref for iso codes here
- you can manually override this:
_mb.state.lang = "jp"; - to use this feature you can:
- ignore it and just provide single strings.
- provide translation objects like :
var hello = { "en" : "hello", "es" : "hola", "fr" : "bonjour" // ... etc };
- you can call this method directly like :
var hello = { "en" : "hello", "es" : "hola", "fr" : "bonjour" // ... etc }; // auto lang choice ... var helloTranslated = _mb.translate(hello); // or override for aspecific lang ... var helloFrance = _mb.translate(hello, 'fr');