On Monday, November 19, 2012 7:45:16 PM UTC+1, Óscar Frías Barranco wrote: > > 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. >
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. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/LVWiYCq5VuUJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
