• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Internationalization

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

I created a ApplicationResources.properties file and mapped in struts config file as
<message-resources parameter="ApplicationResources" null="false"/>

Suppose If I want to add one more property file what should I need to do . How the browser automatically identify the corresponding property file as per the local.

Thanks,
Suneesh VR
 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When u r mentioning <Message Ressources> in ur struts-config file then use
key attribute with it.So whenever u want to use the file then also mention that key.
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Suneesh Raman:

How the browser automatically identify the corresponding property file as per the local.



In fact is not the browser that identifies... it just sends the language he prefers (YOU configure that) in the header:

Accept-Language: pt-br

All the ResourceBundles are loaded by the JVM and if there is one named ApplicationResources_pt-br, this is the one your application will use to "translate" the keys. Otherwise it will use the default.

Cesar
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic