Backing a ResourceBundle with Properties Files: "ResourceBundle labels =
ResourceBundle.getBundle('LabelsBundle', currentLocale);
The getBundle method first looks for a class file that matches the base name and the Locale. If it can't find a class file, it then checks for properties files. In the PropertiesDemo program we're backing the ResourceBundle with properties files instead of class files. When the getBundle method locates the correct properties file, it returns a PropertyResourceBundle object containing the key-value pairs from the properties file.
5. Fetch the Localized Text
To retrieve the translated value from the ResourceBundle, invoke the getString method as follows:
String value = labels.getString(key);"
Friday, May 28, 2004
Nazeer Logs
Previous Posts
- Dynamic Drive DHTML Scripts- Mini window Script: "...
- Moving Elements - Tutorials - HTMLCenter: "Moving ...
- cells: "Retrieves a collection of all cells in the...
- JavaScript: Insert and delete table rows in IE and...
- JavaScript: Insert and delete table rows in IE and...
- DHTMLShock - Intro to DHTML: "Intro to DHTML 9/13/...
- Dropdown Menus #2: "Dropdown Menus #2 This article...
- Modifying Items in a Dropdown List: "The HTML SELE...
- JavaScript Tutorials: "JavaScript Tutorials"
- Methods: "DHTML Methods Internet Development Index...
Subscribe to
Posts [Atom]

<< Home