I am building multilingual support for the app I\'m working on. After doing some research and reading SO (internationalization best practice) I am trying to integrate that in a
Here is an example repo made using i18next, Knockout.Punches, and Knockout 3 with Durandal:
https://github.com/bestguy/knockout3-durandal-i18n
This allows for Handlebars/Angular-style embeds of localized text via an i18n
text filter backed by i18next:
{{ 'home.label' | i18n }}
also supports attribute embeds:
{{ 'home.label' | i18n }}
And also lets you pass parameters:
{{ 'home.welcome' | i18n:name }}
JSON example:
English (en):
{
"home": {
"label": "Home Page",
"title": "Type your name…"
"welcome": "Hello {{0}}!",
}
}
Chinese (zh):
{
"home": {
"label": "家",
"title": "输入你的名字……",
"welcome": "{{0}}您好!",
}
}