Why i18njs? Flexible simple internationalisation for web-apps
<!-- Only 1 dependency: jQuery -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script>
var i18n = new I18N('fr', 'myapp_fr.csv', '#myapp');
// You'll need a tab-separated csv file of translations.
// The #tag is optional -- it's for logging missed translations to the i18njs portal.
var bonjour = i18n.tr('Hello');
document.write(bonjour);
</script>
<!-- Or we can use jQuery to pick out text to translate -->
<span class='i18n'>From English to French</span>
<script>
$('.i18n').tr();
</script>
Assuming your .csv file defines the translations, this will display as:
Bonjour De l'anglais au français
Try it now: HelloWorld.html in French
See the annotated source code, the JSDoc or examples for details.
More coming soon...
Email:
Phone: +506 22907872
Rohrmoser, 10109
San José, Costa Rica
map
Email:
Twitter: @winterwellassoc
127 Rose Street Lane South
Edinburgh, EH2 3DT
map