4 Replies Latest reply on Dec 16, 2005 2:04 PM by proudchief

    localization/i18n support for page names and page titles

    gruenewa

      Hello,

      First i have to say, that the new version of JBoss Portal is very nice. Especially the new themes and layouts are eye candy and well documented.
      But one question I have, I could not answer consulting the documentation. This question is:
      Is there already an i18n-support for page names and titles? I would like to have suche a feature to provide localized menus and links to pages. I would expect something like this:

       <deployment>
       <if-exists>keep</if-exists>
       <parent-ref>default</parent-ref>
       <page>
       <page-name>Hello World</page-name>
       <display-name language="en">Hello</display-name>
       <display-name language="de">Hallo</display-name>
       <display-title language="en">Hello World Page</display-title>
       <display-title language="de">Hallo Welt Seite</display-title>
      

      I think, this would be a nice-to-have feature.

      Best regards,
      Alexander


        • 1. Re: localization/i18n support for page names and page titles

          good idea.

          I think we should keep in synch with the portlet spec and use the xml:lang attribute to separate the display-name for different languages, like:

           <page>
           <page-name>Hello World</page-name>
           <display-name xml:lang="en">Hello</display-name>
           <display-name xml:lang="de">Hallo</display-name>
           <display-title xml:lang="en">Hello World Page</display-title>
           <display-title xml:lang="de">Hallo Welt Seite</display-title>
          


          Why would you separate the display name and the title ?

          • 2. Re: localization/i18n support for page names and page titles
            gruenewa

             

            Why would you separate the display name and the title ?


            The display name of a page could be used in the menu and the tab navigation to render a link to that page. The display title could be used to render the title of a webpage in the browser. In this case the display title should be mapped to a html-title element like this:

            <html>
             <head>
             <title>
             this is the title of the page
             </title>
             </head>
             ...
            </html>
            


            But at least support for localized page names would be a great feature for the next version of JBoss Portal :)

            Best regards,
            Alexander

            • 3. Re: localization/i18n support for page names and page titles
              danny_hon

              Shouldn't internationalization best supported by resource bundle rather than hard coded in the config file?

              • 4. Re: localization/i18n support for page names and page titles
                proudchief

                I agree whole-heartedly with danny_hon. In my experience, getting translators to deal with multi-language XML files is impossible! They like single-language files, such as properties files. At Novell, we use XLIFF files, which is an XML dialect that can be styled to ResourceBundle or Properties format.

                The localization model for portlet preferences would work well for page description and display-name as well, i.e. put a default entry in the deployement descriptor and have the portal container lookup other languages in an associated resource bundle.

                This would make life much easier for localization engineers!