Version 1 (modified by 10 years ago) ( diff ) | ,
---|
Files
binaries/data/mods/public/
globalscripts/
l10n.js
Implements the following global internationalization functions:
translate(message); translatePlural(singularMessage, pluralMessage, number); translateWithContext(context, message); translatePluralWithContext(context, singularMessage, pluralMessage, number); translateObjectKeys(object, keys);
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.
translateObjectKeys
is a helper function that can translate specific properties (keys
array) of a JavaScript object.
sprintf.js
TODO
Note:
See TracWiki
for help on using the wiki.