This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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?

 
 
subject: language propertis to xml properties
 
Similar Threads
Using custom resourceBundle that accepts UTF-8: can't find bundle for base name
Override request headers
java.util.MissingResourceException
locales and jsf
Resource bundle in Prime faces