i18n
MMO.i18n · 5 symbols · generated 30 Sep 2026
DATE_PREFIX
i18n.js:7- Namespace
MMO.i18n
getTranslations
i18n.js:16Get the translation map for a given language
- Namespace
MMO.i18n
| lang | ?string | the locale to use |
| create = false | boolean | if true will create a new Map. else throw an exception if Map does not exist |
| returns | Map | All the translations Map indexed by their languages |
load
i18n.js:50Load translations for a given language
- Namespace
MMO.i18n
| lang | string | the locale to use ('fr', 'en', ...) |
| texts | Map | Object | the texts to load (key => translation) |
$
i18n.js:77Get translation for a given text
- Namespace
MMO.i18n
| text | string | number | Should be the complete text in english |
| lang = null | ?string | the locale to use ('fr', 'en', ...) |
| options = {} | string | the options to pass: - numbers: options for Intl - date: {format: php format} |
| returns | string |
currency
i18n.js:107Format a number as a currency amount, in the user's locale.
- Namespace
MMO.i18n
| number | ||
| currency = null | string | an ISO 4217 code ('EUR', 'USD', ...) |
| lang = null | ||
| returns | string |