RE: Localization of ValidationStrings.properties
"tsvetelin" <[email protected]>
| Newsgroups | gmane.comp.java.tapestry.devel |
|---|---|
| Message-ID | <CEEMLLCCBNBCPDBOCCIJCEKECBAA.tsvetelin.saykov@rushmore-digital.com> |
Hi all, It is a good idea to unify the error translation in tapestry’s validators and the translation of components strings to use one resource manager (a class that is responsible for loading and caching resource files). I think this is the right approach, because you can choose where to store resource data for both translations mechanism (files or database). At the moment this is possible only for the components strings translation.(I have submited a feature request about this) The one posible way is: 1. Define a interface IStringsResourceSource with methods: - Properties getResource(String strURL, Locale objLocale); - IStringsResourse getResource(String strURL, Locale objLocale); 2. Define a interface IStringsResource - String getString(String strKey); - String getString(String strKey, String strDefaultValue); - String getString(String strKey, Object[] arrParams); 3. Change a class DefaultComponentStringSource - change methhod: private Properties readProperties(String basePath, Locale locale, Properties parent) to use the IStringsResourceSource without direct using a InputStream... 4. Chages in a default tapestry validators to use a IStringsResource, that can get it from IStringsResourceSource. best regards Ttsvetelin Saykov -----Original Message----- From: [email protected] [mailto:[email protected]]On Behalf Of Victor Goh Sent: Tuesday, November 26, 2002 11:05 AM To: [email protected] Subject: [Tapestry-developer] Localization of ValidationStrings.properties Hi, How do I localize the ValidationStrings.properties file used by the Validator classes? How do I include a ValidationStrings_zh.properties file into my web-app? My web-app supports multiple languages, so the client side Javascript needs to support multiple languages also. Thanks Victor ------------------------------------------------------- This SF.net email is sponsored by: Get the new Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en _______________________________________________ Tapestry-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tapestry-developer ------------------------------------------------------- This SF.net email is sponsored by: Get the new Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en