Uploaded image for project: 'Maven Site Plugin'
  1. Maven Site Plugin
  2. MSITE-249

Internationalization: Adapt generated directory layout to best practices

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • internationalization
    • None

    Description

      The current directory layout is based on the assumption of a privileged 'default' language. Localized content for this language is placed into the root directory. All other language-specific content is placed into locale-specific subdirectories.

      However, in internationalization, current best practice is to place ALL localized content into subdirectories named after the 2 digit locale abbreviation. Even the default language. (This, of course, is how the Maven structures its site source tree, too).

      Having all localized content using the same structure has many advantages (including that relative links are the same in all languages, it is easy to switch from one language to the next, etc.). In addition, it cleanly separates the localized content from the content that is necessary to inform a user who arrives the first time and who is not automatically redirected to the right language section that he needs to choose the language/preferred country etc.

      In the current layout, the site/index.html has both the task of serving the welcome page content in the default language as well as helping users to make a choice about their preferred language. In the clean structure where all localized content is in subdirectories, the root index.html would only need to help the user make the change between available languages, the index.html in the subdirectories would serve as the localized welcome page. They can easily be translated, there would be no special requirement for the default language's welcome page. (of course all pages would have some menu for switching languages, but it would not be prominent).

      It would be quite simple to make this change. For backward compatibility, one could add a property that preserves the old structure.

      I know that the privileged default language approach by Maven was intended as a feature. But it certainly is not a best practice and has significant drawbacks. We should change it.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              alexanderhars Alexander Hars
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: