I have a monolingual GWT application (English) and I would like to use localized date and number formats.
I have added <inherits name="com.google.gwt.i18n.I18N"/>
to my gwt.xml
, but the formats remain in en-us
. I have checked the browser lacale using this script
private native String getBrowserLocale() /*-{
return navigator.language!=null ? navigator.language : navigator.browserLanguage;
}-*/;
which reports da_DK
.
I also tried forcing the locale by adding <meta name="gwt:property" content="locale=da">
to the index.html
, but no luck.
The only way i can get the correct formats is by directly adding the locales to the gwt.xml
using <extend-property name="locale" values="da" />
, which is quite annoying because there is quite a few locales available.
Does anybody know a workaround for this?