I18n - JSF variable value translation
Posted
by Yurish
on Stack Overflow
See other posts from Stack Overflow
or by Yurish
Published on 2010-05-24T08:39:45Z
Indexed on
2010/05/24
8:41 UTC
Read the original article
Hit count: 262
Hi!
I am using Bundle Internationalization in my project. I have initialized bundle via
<f:loadBundle basename="ui.all.bundles.AppResources_en" var="msg"/>
When i need to translate some text, i am using a key to resourceBundle, to get a value of it, for example: #{msg.someText}. But, now i want to translate text, which key is a value of another variable. For example:
I have variable String textToTransl. It`s value is status_booked. In my AppResources is defined, that status_booked means "It is booked!", so, when i am pointing it to #{msg.textToTransl} i need to see "It is booked!"
How can i make it work?
© Stack Overflow or respective owner