• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Internationalization:is language selected according to client, or server?

 
Sol Mayer-Orn
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I need to use internationalization (creating various "properties" files in various languages).
Those internationalized essages will be printed out using either :
- struts ( <bean:message > , in the older parts of the system
- JSTL in the new parts of the system.

The question: could anyone tell which language will be used by default: does struts/jstl rely on the *server*'s default language (defined on the operating system), or on the *client*'s language (inferred from the request headers) ?

E.g. suppose I have properties files for both english & french. Also suppose the server is english , and the client is french (indicated by its request headers). Which message will be printed out - english or in french ?

Thanks
 
Masoud Kalali
Author
Ranch Hand
Posts: 531
Java Mac OS X Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Struts I18n use client default language for choosing resource file to use in html message tag.
about jstl , it use fmt message tag which select the resource file by using
client default locale (eg : en_US or it could be two character like hr which indicate just the language.)
in both of this tag you can override the client locale.


hope it helps
 
Sol Mayer-Orn
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks very much
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic