Hi,
maybe this goes to the wrong direction, but you could add your own ViewHandler. This would you allow to control the language application wide.
To do this, you have to create a java class like this:
package ch.hasselba.xpages.debug;
import java.util.Locale;
import javax.faces.context.FacesContext;
import javax.faces.application.ViewHandler;
public class ViewHandlerSH extends com.ibm.xsp.application.ViewHandlerExImpl {
@Override
public Locale calculateLocale(FacesContext arg0) {
return Locale.CHINESE;
}
public ViewHandlerSH(ViewHandler paramViewHandler){
super(paramViewHandler);
}
}
Add the code you want for the calculation in the method calculateLocale. For example you could do the lookup to the user profile here, or get settings from the session scope.
Then, you have to register the view handler in the faces-config:
<?xml version="1.0" encoding="UTF-8"?>
<faces-config>
<application>
<view-handler>ch.hasselba.xpages.debug.ViewHandlerSH</view-handler>
</application>
</faces-config>
This example will always return chinese as preferred language.
Hope this helps
Sven