Skip to content Skip to sidebar Skip to footer

How To Use I18next To Localise My Website?

I have a very simple website with no backend, just pure html pages. I need to have English/Chinese versions for this website, what I need to achieve is have a button on NavBar, whe

Solution 1:

According to the doc here is the list of supported-frameworks. As your project is a basic HTML one you should use this https://github.com/mthh/loc-i18next. When you init the module on a TAG you should me make sure there is the data-i18n="myKey" attribute with the key of string that need to be translated. So localize("body"); should translate the whole body but you must add the data-i18n attribute to each tag with a string key


Post a Comment for "How To Use I18next To Localise My Website?"