Open blade1989 opened 9 years ago
i18next is:
i18next is a full-featured i18n javascript library for translating your webapplication.
usage sample:
--------------------HTML--------------------
<!DOCTYPE html> <html> <head> <script type="text/javascript" src="[PATH]/jquery.js" /> // optional <script type="text/javascript" src="[PATH]/i18next.js" /> </head> <body> <ul class="nav"> <li><a href="#" data-i18n="nav.home"></a></li> <li><a href="#" data-i18n="nav.page1"></a></li> <li><a href="#" data-i18n="nav.page2"></a></li> </ul> </body> </html>
--------------------JSON--------------------
{ "app": { "name": "i18next" }, "nav": { "home": "Home", "page1": "Page One", "page2": "Page Two" } }
--------------------JS--------------------
i18n.init(function(t) { // translate nav $(".nav").i18n(); // programatical access var appName = t("app.name"); });
If not js I could also use the equivalent to php:
js
php
i18next is:
usage sample:
--------------------HTML--------------------
--------------------JSON--------------------
--------------------JS--------------------
If not
js
I could also use the equivalent tophp
: