You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2005/04/21 02:45:01 UTC
DO NOT REPLY [Bug 34543] -
Country and language locale not usable for locale validation-constants
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34543>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=34543
------- Additional Comments From niallp@apache.org 2005-04-21 02:45 -------
You describe the problem but not what changes you want Struts to make - do you
have a proposed solution for this?
PropertyMessageResources first searches the specific locale (e.g.
_nl_US.properties) then less specific (i.e. _nl.properties) and then the
default locale. This would seem OK in you case for language resources. For the
validation-constants you could create an alternative MessageResources
implementation that after checking the specific locale (e.g. _nl_US.properties)
then checks for the country (i.e. _US.properties). Then all you need to do is
have two separate bundles - one for language resources and the other for
validation-constants, and configure your custom MessageResources implementation
for the validation-constants bundle.
You would need to create MessageResources and MessageResourcesFactory
implementations to do this. Then in the struts-config.xml...
<message-resource parameter="MyMessageResources" />
<message-resource parameter="MyValidationResources" key="validation"
factory="yourPackage.CountryMessageResourcesFactory" />
Niall
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org