Internationalization: Adapt generated directory layout to best practices
------------------------------------------------------------------------

                 Key: MSITE-249
                 URL: http://jira.codehaus.org/browse/MSITE-249
             Project: Maven 2.x Site Plugin
          Issue Type: Improvement
            Reporter: Alexander Hars


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.  

 
 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to