Change i18n constants in GWT for sweden

68 views
Skip to first unread message

roman_e

unread,
Sep 21, 2012, 4:16:11 AM9/21/12
to google-we...@googlegroups.com
Hello

I use the i18n functionality of GWT to create a multilingual webapplication and I'd like to translate it into swedish too.
But there's the problem that the date format for GWT is wrong in its constants file, so it's in the wrong format on the page.
Is it possible to overwrite these constants somehow without changing the file in the gwt-user.jar itself?
I saw that its in norwegian too, so maybe there are some more wrong definitions in other languages.

Kind regards
Roman

Thomas Broyer

unread,
Sep 21, 2012, 4:31:14 AM9/21/12
to google-we...@googlegroups.com


On Friday, September 21, 2012 10:16:11 AM UTC+2, roman_e wrote:
Hello

I use the i18n functionality of GWT to create a multilingual webapplication and I'd like to translate it into swedish too.
But there's the problem that the date format for GWT is wrong in its constants file, so it's in the wrong format on the page.

Those formats come from the Unicode Consortium's CLDR: http://cldr.unicode.org/
I see they released a new version a week ago, which brings a lot of changes according to their announcement, so hopefully it's just that GWT should be updated to use these new definitions?
 
Is it possible to overwrite these constants somehow without changing the file in the gwt-user.jar itself?

I think the easiest would be to define a new locale (e.g. se_XX) where you override the formats you want to change, and make sure you never use the "se" locale but always the se_XX one (putting only se_XX in the "locale" property might be enough, with the drawback that "se" would then use the fallback locale).

roman_e

unread,
Sep 25, 2012, 7:22:16 AM9/25/12
to google-we...@googlegroups.com
Hi Thomas

Thank you for your help.
It seems that the format is correct and we got wrong informations about this.
It's a bit confusing that one of them is year-month-day and the others are day-month-year.

Kind regards
Roman
Reply all
Reply to author
Forward
0 new messages