Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-266

Include (JVM) default locale in localized resources search path

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0.1, 3.0.2, 4.0
    • 4.2
    • Framework
    • None

    Description

      Including a default locale in localized resources (templates, assets, properties etc.) search path would improve configurability and resource management. Configurability improvement would result from the ability to change applications default language just by changing default locale. Currently default language must be defined in resources (files) that have no locale suffixes and changing it would require changing suffixes of all localized resources/files. Better resource management would result from the ability to define the locale used for each resource, including the default, and to use base resource only for truely language independent resources.

      The search path would be (copied from java.util.ResourceBundle API)

      1) baseName + "" + language1 + "" + country1 + "_" + variant1
      2) baseName + "" + language1 + "" + country1
      3) baseName + "_" + language1
      4) baseName + "" + language2 + "" + country2 + "_" + variant2
      5) baseName + "" + language2 + "" + country2
      6) baseName + "_" + language2
      7) baseName

      In which language2, country2, and variant2 are from the (JVM) default locale. Currently Tapestry skippes phases 4-6.

      This improvement could be achieved in a completely transient way if the default locale used would be configurable inside Tapestry instead of using JVM's, and the default default locale would be "". This would result in the exaclty same search path Tapestry currently uses.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ssaarela Samppa Saarela
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: