File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes [solved] localization problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
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: 70
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
 
Consider Paul's rocket mass heater.
 
subject: [solved] localization problem
 
Similar Threads
Struts2: use a property as key in a jsp
Struts 2 checkboxlist error - list key could not be resolved
Struts 2 - i18n Chinese localization issue
Populate values from request in Struts 1
How to use getText() in JSP