Hey Bryan, Right now we don't have a plan to generalize the i18n support. All of the plugins handle this by simply exposing options which can be changed by the user in any way they want. I don't really think the datepicker model is necessary since it's unlikely that you would load several locales onto a single page. I would prefer if plugins followed the dialog model where the options are flat instead of nested under a locale setting.
On Jan 18, 9:31 pm, Bryan Berry <br...@olenepal.org> wrote: > Does 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/
-- You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to jquery...@googlegroups.com. To unsubscribe from this group, send email to jquery-ui+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en.