| Author |
i18n of a string with a number
|
Pho Tek
Ranch Hand
Joined: Nov 05, 2000
Posts: 757
|
|
I am creating a website that does searches for something in a form (in JSP) and returns a list of found items. I want to localize the string "Found X items" in a taglib. Can anyone brainstorm on how to do this ? Firstly passing in the number is mandatory. Maybe, e.g <foundCount num="4"/> The taglib will read the locale from web.xml. The difficult part (to me) is how do you translate "found x items" to other languages as all have different structure. In another language, it could be: 4 <items> <found> or <item> 4 <found> or whatever syntax the language dictates. Thanks Pho
|
Regards,
Pho
|
 |
Pho Tek
Ranch Hand
Joined: Nov 05, 2000
Posts: 757
|
|
i found it myself. see java.text.MessageFormat. Thanks to myself.
|
 |
 |
|
|
subject: i18n of a string with a number
|
|
|