I18n in JavaScript

added by Robert Greyling
10/8/2014 1:36:10 PM


Certainly, many solutions such as frameworks, SDKs for mobile apps and programming languages, have support for multiple languages ​​in developed application. Today we try to find such solutions in JavaScript. We look at some of the ways to support multiple languages ​​in the JavaScript code.


Jonathan George
10/8/2014 2:51:34 PM
Looks promising, but less convinced by the need to set up all your localisation bits in JS. I've been using a library not mentioned in this post - jsperanto (https://github.com/jpjoyal/jsperanto/) - on a fairly large scale project (currently around 1200 entries in my languages file) which will be translated into 13 languages, and the idea of loading all that in one go (15,000+ lines of code), as seems to be necessary with some of the examples in the post, is not a nice one. jsperanto lets you externalise each language resources into a separate JSON file, which is loaded on demand. I've been keeping my resources in a CSV file, for ease of managing the translations themselves. I then convert this individual language JSON files with a small console app as part of my build process, and this has seen good results.

Robert Greyling
10/8/2014 3:00:23 PM
Sounds like that might be worth blogging about? :) I'd be interested in seeing how that process fits together

JavaScript Kicks
10/8/2014 3:01:20 PM
We'll try see if the article author has an opinion. It could be there's more than one way to skin this cat!