Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-230

Fallback stragtegy for resource bundles and locales

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 0.2-incubating
    • 0.3-incubating
    • I18n-Module
    • None

    Description

      Maybe it would be nice to have an fallback strategy for the resolving of the resource bundles for given locale.
      For those usecases where the locale cannot be modified to an supported locale an fallback strategy would be fine.

      If resources bundle with message_LANGUAGE.properties is present but Locale would be LANGUAGE_COUNTRY or LANGUAGE_COUNTRY_VARIANT it would result in an Exception because resource bundles for these kinds of Locales wouldn't be defined.
      It would be sensless to define resource bundles for all kind of possible locales such as de_DE, de_AT, de_CH, maybe just in some special cases. Cal10N didn't provided this feature, but i think if would be fine if deltaspike could. For sure this behavior should be enable and disable able via @MessageContextConfig.

      Another question:
      Does message module support merging of resource bundles such as cal10n does?
      Means resouce bundles with _de.properties, _de_DE.properties are handled as a single one in cal10n and if key is not present in de_DE.properties but Locale is de_DE it takes the one defined in _de.properties.

      Attachments

        Activity

          People

            struberg Mark Struberg
            cchet Thomas Herzog
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: