| 1 | = Files = |
| 2 | == binaries/data/mods/public/ == |
| 3 | === globalscripts/ === |
| 4 | ==== l10n.js ==== |
| 5 | Implements the following global internationalization functions: |
| 6 | |
| 7 | {{{ |
| 8 | translate(message); |
| 9 | translatePlural(singularMessage, pluralMessage, number); |
| 10 | translateWithContext(context, message); |
| 11 | translatePluralWithContext(context, singularMessage, pluralMessage, number); |
| 12 | translateObjectKeys(object, keys); |
| 13 | |
| 14 | }}} |
| 15 | The first four functions are simply wrappers for the engine internationalization functions (such as `Engine.translate`). These global functions use caching to reduce the number of calls to the engine functions, because calls to engine functions require string conversions that are far from cheap. |
| 16 | |
| 17 | `translateObjectKeys` is a helper function that can translate specific properties (`keys` array) of a !JavaScript object. |
| 18 | |
| 19 | ==== sprintf.js ==== |
| 20 | TODO |