If only language then it will try that. So the order for a locale of 'es_ES' will look for files in this order
1. ApplicationProperties_es_ES.properties 2. ApplicationProperties_es.properties 3. ApplicationProperties.properties
So if you have a locale of 'es' then it will try
1. ApplicationProperties_es.properties 2. ApplicationProperties.properties
If a key is missing in the most specific property, it will check the next one in the list. English example:
ApplicationProperties.properties: home.greeting=Greetings ApplicationProperties.properties: home.farewell=Farewell ApplicationProperties_en.properties: home.greeting=Hello ApplicationProperties_en.properties: home.farewell=Goodbye ApplicationProperties_en_US.properties: home.greeting=Howdy ApplicationProperties_en_AU.properties: home.greeting=G'day Mate ApplicationProperties_en_NZ.properties: home.farewell=See ya
So someone from en_NZ would see 'Hello' as it would use the home.greeting key from ApplicationProperties_en.properties.
So someone from en_NZ would see 'See ya' as it would use the home.farewell key from ApplicationProperties_en_NZ.properties.
You could put 90% of the en language into the _en file, and just put keys where things like spelling change in the country specific parts.
Eric Dahnke wrote:
Hello list,
We're building an internationalized site, and we're having an issue with locales and resource bundles. If we have two specific resource bundles for Spanish from Spain (ApplicationProperties_es_ES.properties) and Spanish from Argentina (ApplicationProperties_es_AR.properties), one would think a browser arriving with a locale/user-agent of es_MX would be caught by one of the two es_* properties file, but infact es_MX gets the default English properties file, unless there is specifically a ApplicationProperties_es.properties file.
Is this the expected behavior?
Thx
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Jason Lea
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]