• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Message resource bundle

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good Day,

Im debugging a code that has the following setting:

<application>
<message-bundle>com.web.resources</message-bundle>
<locale-config>
<default-locale>en_US</default-locale>
<supported-locale>fr_FR</supported-locale>
</locale-config>
<resource-bundle>
<base-name>com.web.resources.message</base-name>
<var>message</var>
</resource-bundle>
</application>

Just want to ask, for example I have message_en_US.properties and message_en_SG.properties.

And the web is currently using the SG property but one property is not exist on it, can I just redirect to use the US property?

Cause right now im receiving ???missing_property???

Regards
 
Sheriff
Posts: 3036
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What you probably want is a file called message_en.properties, which contains everything that's the same between US and Singaporean English, and then use the message_en_US.properties and/or message_en_SG.properties just for the differences.

OK, la?
 
Hisouka Devera
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I mean, for example I have a new property namely:

new_property=New Property Message

I already define this in US but not in SG due to production deployment availabilty.

so SG site will have ???new_property???, can I just redirect to use US instead, if I received this ???new_property???, Until the deployment team define already the new_property.
 
Saloon Keeper
Posts: 24283
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Message resources are stacked in layers. You always have a base layer that's used to resolve any resource IDs that the higher layers could not resolve.

In the specific case of language layers, the stack goes from most-specific to least-specific. For example, US English, "Universal" English, then the defaults (which are typically English as well, but that's just the Internet for you.)

Likewise, Brazilian Portuguese, Portuguese in general, default (English).

If the resource ID cannot be resolved by descending through (and searching) these layers, the resource resolver will return "??resource-id??" to let you know that there's no resolution and what the resource-id was that couldn't be resolved.
 
Yes, my master! Here is the tiny ad you asked for:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic