The moose likes Struts and the fly likes [solved] localization problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "[solved] localization problem" Watch "[solved] localization problem" New topic
Author

[solved] localization problem

Tudor Raneti
Ranch Hand

Joined: Nov 29, 2009
Posts: 145
Found it, had a naming problem while i had appname in package.properties and that's why only that worked.

i created this property file: ClassName.properties in the ClassNames's path.

It contains:
appname = Loto
tooasltip = Home Page

In the code if i write: <s:text name="appname" /> it works and displays Loto
If i write <s:text name="tooasltip " /> it displays "tooasltip" instead.
What am i doing wrong?

I mention i just change the property name and leave the code in place, and it behaves differently for different property names.
Also the order the properties are defined in their file is irrelevant, as it should, what goes wrong then?
Same weirdness with <s:text name="getText('appname')" /> -it works, <s:text name="getText('tooasltip )" /> doesn't.
Jayaraj Jaganathan
Ranch Hand

Joined: Jun 29, 2009
Posts: 69
amazing !!!


appname = Loto
tooasltip = Home Page


i hope issue in deployment. delete the property file test it.
then add the property file and test it
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: [solved] localization problem
 
Similar Threads
Struts 2 checkboxlist error - list key could not be resolved
Struts2: use a property as key in a jsp
Populate values from request in Struts 1
Struts 2 - i18n Chinese localization issue
How to use getText() in JSP