A simple internationalization module for KnockoutJs, check out the live demo for simple workings.
The current locale string, or array of strings as locale chain fall back. This module read this observable to resolve a bundle for translations.
Assigns a bundle object of key-value translation under target locale.
locale
{string|array} Target locale string(s)bundle
{Object} An object for direct key-value translation.
Assigns multiple bundles to multiple locale, act as a multiple version of ko.i18n.setBundle(locale, bundle)
.
bundles
{Object} An object with keys as locale, and values be designated bundle.
key
{string} Resolves a translation using currentko.i18n.locale
.
substitudes
{array} Array of values to be subtitudes using mustache syntax inside the bundle translation, seeexample.html
for example usage.