java - L10N: why was the default language applied -
in application, on login page, there language option on top of page.
if choose chinese, translated chinese perfectly.

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.

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
Post a Comment