0

how ro reload label for internalization

asked 2013-01-11 12:43:19 +0800

VincenzoDC gravatar image VincenzoDC
30

updated 2013-01-22 05:17:23 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

hi guys i have a problem on internalization i have a page whit table with series of pair label textbox(user insert this value) when i click on button "english version" change locale and reload page with instruction

execution.sendRedirect("");

but in this case i'm lost textbox value (if is present) how to i reload labels content without reload all page? i try with Labels.reset http://www.zkoss.org/javadoc/3.0.7/zcommon/org/zkoss/util/resource/Labels.html#reset() but doesn't work.

bye

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-01-21 14:52:24 +0800

VincenzoDC gravatar image VincenzoDC
30

updated 2013-01-22 05:18:29 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

tnx for your tips. but i have more labels. is exists a metod to select only one component kind in page? anything like

component.getChildren(typeOfComponent)

bye

link publish delete flag offensive edit
0

answered 2013-01-14 09:12:36 +0800

Neus gravatar image Neus
1415 14

updated 2013-01-22 05:18:07 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

Hi Vicenzo, this may help:

  Locale prefer_locale = new Locale(en);//The new Locale
    session.setAttribute(org.zkoss.web.Attributes.PREFERRED_LOCALE, prefer_locale);
    Clients.reloadMessages(prefer_locale);
    org.zkoss.util.Locales.setThreadLocal(prefer_locale);
    //Reload all components labels
    LBLHola.setValue(Labels.getLabel("hola"));
    LHNombre.setValue(Labels.getLabel("nombre"));
    //etc.
link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2013-01-11 12:43:19 +0800

Seen: 78 times

Last updated: Jan 22 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More