Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-2434

[i18n] Country and language locale not usable for locale validation-constants

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.2.6 Beta
    • 1.4.x
    • Core
    • None
    • Operating System: other
      Platform: Other
    • 34543

    Description

      When you have a system for multiple countries and multiple languages:

      • Languages are flexible across all country sites: a user needs to be able to
        switch to another language on country NL and country US
      • Countries have country specific validation-constants: e.g. zipcode regular
        expression checks
      • You don't want to duplicate language resources. All nl language parameters
        should go into _nl.properties, not _nl_NL.properties b/c this would mean
        duplicating all language files across all country implementations
      • You don't want to put nl content in an _NL file, b/c that would make country
        sites with flexible languages impossible

      It is not possible to combine this:

      • use locale nl: loads _nl.properties, but does not load validation-
        constants_NL.xml
      • use locale NL: does not load _nl.properties, but does load validation-
        constants_NL.xml
      • user locale nl_NL: requires you to copy content of _nl.properties to
        _nl_NL.properties, _nl_US.properties etc

      One option is to change the locale temporarily during the request by
      overriding processValidate. Unfortunately, this works to the point where an
      error message is retrieved on a DynaValidatorForm, the error message is
      retrieved from _NL.properties (doesn't exist).

      Kind regards,

      Marc

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mschipperheyn marc schipperheyn
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: