0

I18N of ZK Objects

asked 2015-05-08 11:12:26 +0800

AlwaysALearner gravatar image AlwaysALearner
3 2

updated 2015-05-08 11:21:52 +0800

I have a <grid> which contains multiple ZK objects like a<<static_text>>, 2 to 3 <textbox> objects, a <combobox> object, etc.. and in the UI, when I populate the values, it looks like I'm filling up the blanks. They are in order in such a way that it makes perfect sense only in English, but the order of the contents of the <grid> should vary based on the locale I select.

I know this can be achieved by manually writing code for another language and flexing based on the locale check done.

My question is - Is it possible to achieve this using a generic approach, instead of the approach that I've mentioned above? (Eg: like how we use properties file to define the message to be displayed with dynamic string values)

delete flag offensive retag edit

Comments

you mean templates for each locale?

chillworld ( 2015-05-08 20:18:57 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-05-10 11:20:45 +0800

Darksu gravatar image Darksu
1991 1 4

Hello AlwaysALearner,

As chillworld also suggested you could use templates as shown below:

http://books.zkoss.org/wiki/ZK%20Developer's%20Reference/MVC/View/Template/Grid%20Template

I also found an interesting example using listboxes:

http://emrpms.blogspot.gr/2014/05/zk-mvvm-list-box-with-dynamic-template.html

Best Regards,

Darksu

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
2 followers

RSS

Stats

Asked: 2015-05-08 11:12:26 +0800

Seen: 14 times

Last updated: May 10 '15

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