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

Allow global i18n bundle location to be customized

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.1.1
    • 4.1.2
    • Framework
    • None

    Description

      The current mechanism for specifying a global i18n resource bundle is not very flexible.

      http://jakarta.apache.org/tapestry/UsersGuide/localization.html#localization.namespace

      It requires you to name your i18n bundles the same as your .application file. Furthermore, it requires that your bundles be places in the WEB-INF directory. Most other web frameworks (and Java applications in general) require you to have the ResourceBundle somewhere in your classpath (generally in the root - WEB-INF/classes).

      1. I think the root of the classpath should be the default location - even if you're using the ".application name matches i18n name" mechanism.
      2. It should be possible to customize the name of the file. Possibly something like the following in your .application file:

      <property name="org.apache.tapestry.global-properties" value="ApplicationResources"/> -> points to WEB-INF/classes/ApplicationResources.properties (and others with _locale.properties
      <property name="org.apache.tapestry.global-properties" value="com.myapplication.web.messages"/> - points to /WEB-INF/classes/com/myapplication/web/messages.properties

      Attachments

        Activity

          People

            jkuhnert Jesse Kuhnert
            mraible Matt Raible
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: