Durandal (knockout) app with multilanguage support

后端 未结 4 1190
自闭症患者
自闭症患者 2021-02-01 08:18

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

4条回答
  •  南笙
    南笙 (楼主)
    2021-02-01 09:00

    I was quite inspired by the answers in SO regarding this topic, so I came up with my own implementation of a i18n module + binding for Knockout/Durandal.

    Take a look at my github repo

    The choice for yet another i18n module was that I prefer storing translations in databases (which ever type required per project) instead of files. With that implementation you simply have a backend which has to reply with a JSON object containing all your translations in a key-value manner.

    @RainerAtSpirit Good tip with the singleton class was very helpful for the module

提交回复
热议问题