JSF 2 | localization question
I am trying to use localization with JSF 2. so i used javax.faces.resource.localePrefix property in message bundle.
All works fine and javax.faces.resource.localePrefix is read based on the client's browser locale.
but when i tried to change the locale upon user's choice(choose between languages), javax.faces.resource.localePrefix is still read based on browser's locale.
i used the following techniques to change the locale on runtime, assuming that user's browser locale in "ar" and i want to change into "en":
2- used preRenderView listener to change the locale using:
3- used phase listener and on RESTORE_VIEW phase i have done the following:
all my retrials have failed, i suspect this to be and issue with JSF2.
your help is highly appreciated.
thanks in advance.