2013-03-28 Update : This plugin is now hosted on GitHub
2010-09-29 Update : This plugin has been moved from subversion to git, and now has a dedicated project page . Subversion updates will be discontinued, so please update your links to point to the latest version!
2010/08/01 Update : Thanks to everyone that pointed out the scope issue and lack of this - it should be fixed now.
To try it out, download the sample files , or check them out using git :
The index.html file should be fairly self-explanatory… before you do any translation you have to initialise the plugin with a ‘dictionary’ (basically a property list mapping keys to their translations).
1 2 3 4 5
Once you’ve initialised it with a dictionary, you can translate strings using the $.i18n._() function, for example :
If you want a solution that’s a bit more global, Keith Wood has written a localisation plugin that looks very nice (i haven’t actually tried it).