• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Message files not getting picked in the order as desired

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a folder named i18n in which there are message files namely
gaurav_en.properties
gaurav_ja.properties

Now, if this is accessed from a japanese server, with the language in the browser set as en_US, gaurav_ja.properties is getting loaded instead of the gaurav_en.properties.

I read somewhere that first the server will try to load the gaurav_en_US, then gaurav_en and then if it is not found, it will load the default locale of the server that is gaurav_ja.

I need help on this.

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

Originally posted by gaurav chaudhary:
I read somewhere that first the server will try to load the gaurav_en_US, then gaurav_en and then if it is not found, it will load the default locale of the server that is gaurav_ja.


To my knowledge, your understanding is correct, provided the locale set in the browser is en-US. Are you 100% sure that you have set the default language correctly in your browser? Remember that in Microsoft Internet Explorer, if you specify multiple languages, the default language is the one at the top of the list.
[ February 12, 2007: Message edited by: Merrill Higginson ]
 
gaurav chaudhary
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for replying...

I think I got the workaround on this. The locale object that was getting made was having "en_US" in the language field due to which this issue was there. I just replaced it and it works fine BUT only on Mozilla.

Now I have another issue which is inspite of anything I set in the Internet Explorer, the request.getLocale() is always giving the en_US as the value.

I changed the settings in the Tools->Internet Options->General->Languages. I removed en_US at all and just had "ja" but still it gives me en_US. This isuue is not there if I access the application by Mozilla.
I am using IE6 as my browser.

Any help on this will be appreciated...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic