aspose file tools*
The moose likes Servlets and the fly likes how container can access .properties file on the basis of client specific language Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how container can access .properties file on the basis of client specific language" Watch "how container can access .properties file on the basis of client specific language" New topic
Author

how container can access .properties file on the basis of client specific language

sai prasanna
Ranch Hand

Joined: May 02, 2005
Posts: 167
hi

If i have clients from different geographical regions(for ex french, japanese) then my application will have MyApplication_french.properties, MyApplication_japanese.properties files when a french/japanese client access the welcome/index page there he can select the language in select box and clicks on the submit button based on this language parameter a particular application.properties is selected
1) how this process goes on and
2) is there anyother way of specifying languages in select box

thanks in advance
saiprasanna
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Originally posted by sai prasanna:
hi

If i have clients from different geographical regions(for ex french, japanese) then my application will have MyApplication_french.properties, MyApplication_japanese.properties files when a french/japanese client access the welcome/index page there he can select the language in select box and clicks on the submit button based on this language parameter a particular application.properties is selected
1) how this process goes on and
2) is there anyother way of specifying languages in select box

thanks in advance
saiprasanna


I am not sure, I understood your question correctly or not.

But there are two ways to give local language to user.

1. Get the language from browser, use ResourceBundle and change the content as per the language from the very first page (no need to give option to user to select the language)

2. Give an option to user to select the language and then change the content as per the language he/she selects.

What you want to implement?

If first one then get the locale/language from request (I think, getLocale()) and use ResourceBundle and...

If second then get the language from request parameter (whatever is the name of radio button etc) and do the rest of the things....

Are you looking for something else???
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Browsers send locale information in the user-agent header.

A Google Search with keywords "java i18n tutorial locale fmt JSTL|Struts" should get you started.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
sai prasanna
Ranch Hand

Joined: May 02, 2005
Posts: 167
thanks rathi & ben
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how container can access .properties file on the basis of client specific language
 
Similar Threads
what's the syntax for "indexed" items in a picklist box ?
is it good idea to learn german for the sake of career
Bilingual display question
French/German/Japanese???
How to display Chinese in TextArea