java - L10N: why was the default language applied -


in application, on login page, there language option on top of page.

language option

if choose chinese, translated chinese perfectly.

chinese

if click refresh button or ctrl + r, page still in chinese. however, if open tab going same url, though language option still shows chinese chosen, english again.

english again

nevertheless, if click about us or methodology, next page in chinese again should be.

i'd grateful if tell me have done wrong here.

best regards,

there's apparently problem in how set locale of uiviewroot.

it should done <f:view locale> follows in master template, perhaps had right other pages, not home page.

e.g.

<!doctype html> <html lang="#{localebean.language}"     xmlns:f="http://java.sun.com/jsf/core"     xmlns:h="http://java.sun.com/jsf/html"     ... >     <f:view locale="#{localebean.locale}">         <h:head>             ...         </h:head>         <h:body>             ...         </h:body>     </f:view> </html> 

where #{localebean} @sessionscoped 1 similar this.

this problem way indicates pages don't share common master template , you're duplicating xhtml code here , there. i'd work on :)


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -