This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JSF and the fly likes language propertis to xml properties Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "language propertis to xml properties" Watch "language propertis to xml properties" New topic
Author

language propertis to xml properties

bostian tov
Ranch Hand

Joined: Mar 11, 2010
Posts: 32
Now i am using plain text language properties, but have some more complex stuff and want to start using xml.

Settings:



Call from jsf:



Example:


subscription=Subscription


So how can i use xml file instead text file and what do i have to change? Thanks
Adrian Mitev
Greenhorn

Joined: Sep 15, 2010
Posts: 10
In java 1.6 you can use xml for properties files but the format is quite ugly. Here is an example of this.
bostian tov
Ranch Hand

Joined: Mar 11, 2010
Posts: 32
How can you access xml properties file from JFS(jsp) page? Now i am just refering to #{lng.someValue}
Adrian Mitev
Greenhorn

Joined: Sep 15, 2010
Posts: 10
The same way as .properties files.
bostian tov
Ranch Hand

Joined: Mar 11, 2010
Posts: 32
My code:



So on startup data for locale sl_SI is beeing loaded. So do i need to have this code or should i change it somehow to get this working?

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: language propertis to xml properties
 
Similar Threads
Using custom resourceBundle that accepts UTF-8: can't find bundle for base name
java.util.MissingResourceException
Resource bundle in Prime faces
Override request headers
locales and jsf