es_AR locale is not using es_419 properties

176 views
Skip to first unread message

Óscar Frías Barranco

unread,
Nov 19, 2012, 1:45:16 PM11/19/12
to google-we...@googlegroups.com
Hello.

We are trying to implement Runtime Locales as explained in:

https://developers.google.com/web-toolkit/doc/latest/DevGuideI18nLocale#RuntimeLocales

We are using a gwt.xml like this one:

<module>

    <inherits name='com.google.gwt.user.User'/>
    <inherits name="com.google.gwt.i18n.CldrLocales"/>

    <extend-property name="locale" values="en"/>
    <extend-property name="locale" values="es"/>
    <extend-property name="locale" values="es_419"/>

    <set-property name="locale" value="es,es_419,en" />

    <set-property-fallback name="locale" value="en" />

</module>


But the problem is that when we in runtime select locale=es_AR, the localized strings that are displayed are those from Messages_es.properties instead of those from Messages_es_419.properties as we would expect.

Why is this happening?  In theory es_AR locale should "extend" es_419 locale (Latin American Spanish), so the compiler should look for the substitution strings following this priority:
1) Messages_es_AR.properties
2) Messages_es_419.properties
3) Messages_es.properties
4) Messages.properties

But apparently the step 2 is not performed.  Do you know how to fix this?

When we use locale=es_419 the strings are OK but this not a solution because we also need currency information which is in the es_AR locale and not in the es_419 locale.

Thanks!
Oscar


Thomas Broyer

unread,
Nov 24, 2012, 9:26:22 PM11/24/12
to google-we...@googlegroups.com
The "region inheritance" (where AR is a child of 005 which is in turn a child of 419) is only used for CLDR data (date/time and number formatting), not for resolving messages. The documentation is wrong here, in that it doesn't match what the code does. I can't comment on what it should/could do here as I don't know much about I18N. I'd suggest you file an issue so that someone could either fix the code or the documentation.

Óscar Frías Barranco

unread,
Nov 26, 2012, 7:55:55 AM11/26/12
to google-we...@googlegroups.com
OK, thanks, I have reported the issue here:

http://code.google.com/p/google-web-toolkit/issues/detail?id=7808
Reply all
Reply to author
Forward
0 new messages