aspose file tools*
The moose likes JSF and the fly likes JSF and internationalization Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF and internationalization" Watch "JSF and internationalization" New topic
Author

JSF and internationalization

bada Bos
Greenhorn

Joined: Jan 18, 2008
Posts: 2

Hello evry body,
to change the local of my web application i've done the code below :


public void processChangeLocal(ValueChangeEvent event){
Locale newLocal = new Locale( (String)event.getNewValue());
FacesContext context = FacesContext.getCurrentInstance();
context.getViewRoot().setLocale(newLocal);
context.getApplication().setDefaultLocale(newLocal);
}

This method is called when the user changes the language. By my problem is only the local of the currente page changes.

i've done this in the faces-config :

<locale-config>
<default-locale>fr</default-locale>
<supported-locale>fr</supported-locale>
<supported-locale>en</supported-locale>
</locale-config>
Aravind M Jay
Greenhorn

Joined: Mar 16, 2006
Posts: 15
These links may help you -

http://forums.sun.com/thread.jspa?threadID=570560
http://www.i-coding.de/www/en/jsf/application/locale.html

Regards,
Aravind
 
wood burning stoves
 
subject: JSF and internationalization