Allows external scripts (including the Gadget selection script) to setup a locale through a property named __gwt_Locale on window. This is intended to allow the Gadget selection script can populate locale, but could serve as a general purpose mechanism. Patch by: bmccann,zundel Review by: jat git-svn-id: https://google-web-toolkit.googlecode.com/svn/releases/1.6@4644 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/i18n/I18N.gwt.xml b/user/src/com/google/gwt/i18n/I18N.gwt.xml index 061a67f..ee214c6 100644 --- a/user/src/com/google/gwt/i18n/I18N.gwt.xml +++ b/user/src/com/google/gwt/i18n/I18N.gwt.xml
@@ -45,6 +45,11 @@ } if (locale == null) { + // Look for an override computed by other means in the selection script + locale = $wnd['__gwt_Locale']; + } + + if (locale == null) { return "default"; }