Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-65174

Displaying localised static content in a theme

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Won't Fix
    • Affects Version/s: 6.2.1 CE GA2, 7.0.0 CE GA1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Liferay 6.2
    • Fix Priority:
      3

      Description

      Hello,

      I am using the resources importer to specify the structure of portal in a sitemap.json.

      The localisation of the menu items with the nameMap works fine.

      If I specify a static content in a column like this:

      sitemap.json
            "####Comment####": "Willkommensseite",
            "columns": [
              [
                "Lang.xml"
              ]
            ],
            "friendlyURL": "/ims",
            "name": "IMS",
            "nameMap":
                    {
                      "de_DE": "Willkommen",
                      "en_US": "Welcome"
                    },
      

      and put the following Lang.xml in the folder /WEB-INF/src/resources-importer/journal/articles:

      Lang.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <root available-locales="de_DE, en_US" default-locale="de_DE">
          <static-content language-id="en_US">
      			<![CDATA[
      				<p>
      		       Localisation en_US.
                 Changed 20160321.
      			  <br />
      				<br />
      					Text in english.
      				</p>
      			]]>
          </static-content>
          <static-content language-id="de_DE">
      			<![CDATA[
      				<p>
      		       Lokalisation de_DE.
                 Geändert 20160321.
      			  <br />
      				<br />
      					Text auf deutsch.
      				</p>
      			]]>
          </static-content>
      </root>
      

      The content always shows the german one, regardless the language of the user or if I specify the language in the URL.

      If I click on "Edit" it shows, there is a translation available in English (United States), but when I click this button, it shows only the german content.

      Can anyone tell me how to specify the content in the xml correctly?

      Many thanks in advance,

      Hans

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 5 weeks, 3 days ago

                Packages

                Version Package