Doe jQuery UI have an internationalization strategy?
As far as I can tell there isn't a comprehensive i18n strategy for jQuery UI. The datepicker widget supports i18n, but having a separate i18n implementation for each widget seems to be a bit wasteful and redundant
The first step would be to emulate basic GNU gettext, where you could set the locale globally for your jQuery UI widgets
$.ui.locale = "ne"; for Nepal
and have a global jquery.ui.strings.json file where plugins could query for matching strings.
In my case, I have a scoreboard widget which shows the user's current score in the game and text on buttons "Restart", "Play", "Pause"
rather than just hard coding the text into my widget, I could put a wrapper function around text
$("<div>" + $.gettext("Play") + "</div>") // or $._("Play") for short-hand method
The gettext method would check against the jquery.ui.json for a translated version of that string. If none exists, or the jquery.ui.strings.json doesn't exist, the string is returned unaltered.
Thoughts?
For those not familiar with Gnu gettext, it is the i18n mechanism for gnome, kde, rails, django, and most popular open-source frameworks
http://www.gnu.org/software/gettext/