1

Internationalization Labels in zul upper case

asked 2013-11-29 13:23:55 +0800

Neus gravatar image Neus
1415 14

updated 2013-11-29 13:24:12 +0800

Hi, I'm implementing internationalization using i18n. I'm accesing Labels via ZUL. I need to make an upper case to on of the labels. Is it possible something like

 <label id="LBLActualTexto" value="${toUpperCase(labels.Ocupacion)}"/>

???

Thank you very much

delete flag offensive retag edit

1 Answer

Sort by » oldest newest most voted
1

answered 2013-11-30 12:28:31 +0800

chillworld gravatar image chillworld flag of Belgium
5322 4 9
https://github.com/chillw...

updated 2013-12-02 10:49:32 +0800

Scrap the converter, it can be simpler:

<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<zk>
    <window border="normal" title="hello" apply="org.zkoss.bind.BindComposer">
        <label id="LBLActualTexto" value="${c:toUpperCase(labels.Occupation)}"/>
</window>
</zk>

update how to with labels and values from your VM

@load(c:cat4(labels.Occupation,vm.selectedUser.name,' -- ',vm.selectedUser.firstname))

Greetz chill.

link publish delete flag offensive edit

Comments

But how can I user a converter with Labels? In the link they only use it with data binding

Neus ( 2013-12-02 08:05:41 +0800 )edit

are you using mvc or mvvm?

chillworld ( 2013-12-02 08:09:06 +0800 )edit

mvvm, but I'm loading labels using this syntaxis to get them from the properties files: label="${labels.Consultas}"

Neus ( 2013-12-02 08:40:33 +0800 )edit

Thank you chill, I tried it but it throws this exception: org.zkoss.zel.ELException: Función "c:toUpperCase" not found. Maybe I need to add an additional library or something?

Neus ( 2013-12-02 09:30:55 +0800 )edit

I haven't seen the taglib, now it works, thank you very much!

Neus ( 2013-12-02 10:17:31 +0800 )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
1 follower

RSS

Stats

Asked: 2013-11-29 13:23:55 +0800

Seen: 29 times

Last updated: Dec 02 '13

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