5 Replies Latest reply on May 2, 2013 12:35 AM by MeasurableBusinessResults

    i18n - how to add support for more languages (CQ 5.4)

    MeasurableBusinessResults Level 1

      I have a number of questions around adding support for more languages. We are already using multiple languages and would like to add more.

       

      1. Standard languages provided

      in /libs/wcm/core/i18n I can see the standard ootb languages for CQ 5.4: de es fr it ja zh-cn

      How can I add more? Are there additional language packages provided by Adobe for CQ 5.4?

       

       

      2. Translator tool

      We have our own additional keys/strings in

        /apps/site/i18n/publish

       

      When I open these with the translator tool

        /libs/cq/i18n/translator.html

      as admin, I can see them all just fine.

      However when I open them as another user, I only see the columns of the languages defined in /libs/wcm/core/i18n

      There is a description how to extend this for 5.5 here:

      http://dev.day.com/docs/en/cq/5-5/developing/cq5-translator.html#Changing%20Languages%20Li sted%20in%20the%20Grid

      and I have added the languages to /etc/languages in the "languages" property, but this does not work with 5.4 apparently (at least as far as I have tried).

      I still only get the default languages from /libs/wcm/core/i18n despite the other languages being there in

        /apps/site/i18n/publish

      and as admin I can see and edit them.

      How do I make them visible and editable for other users?

       

       

      3. Tags

      When editing the translations of tags, I want all the possible languages to appear in the dialog box for editors.

      I have extended the "languages" property in /etc/tags and this works basically fine (as expected) as described in:

      http://dev.day.com/docs/en/cq/5-5/developing/cq5-translator.html#Changing%20Language%20Nam es%20and%20Default%20Countries

       

      The desired language must be supported and listed in:

        /libs/wcm/core/resources/languages

       

      I want to use a 2-letter iso code (e.g. "no" for Norway") and this desired 2-letter iso code must exist as a node. If that is not the case and only nodes with locales exist (e.g. "no_no" and "no_no_ny") then a 2-letter node must be created with a default setting pointing to the default locale.

      I have tried this and it works fine as expected when the default language node is created in

        /libs/wcm/core/resources/languages

      But /libs is a system folder that should not be modified, it could be potentially overwritten by Adobe packages.

      The 5.5 docs say to create the node in

        /apps/wcm/core/resources/languages

      instead, but this did not work for me in CQ 5.4 and I could find no other docs describing a process for 5.4

      How to do this properly in 5.4?

        • 1. Re: i18n - how to add support for more languages (CQ 5.4)
          aklimets Adobe Employee

          1. Languages

           

          For 5.4 there are no other languages. Since 5.6 CQ also comes with Korean (also available as feature pack for 5.5 - cq-5.5.0-featurepack-1975) and with 5.6.1 we are adding more.

           

          2. Translator tool

           

          The user needs to have read and/or write access to the dictionary nodes.

           

          3. Tags

           

          The option to overlay the language list under /apps was only added with 5.5.

           

          HTH,

          Alex

          • 2. Re: i18n - how to add support for more languages (CQ 5.4)
            MeasurableBusinessResults Level 1

            Thanks for your reply.

             

            Regarding 2.

            The user does have read access to the dictionary nodes in  /apps/site/i18n/publish - he sees the strings for the languages that are an intersection of the ones in /libs and the dictionaries (e.g. de fr es it)

             

            Since it seems I need 1. to be able to see all languages in the translator, can I create empty dummy nodes in /libs/wcm/core/i18n ? E.g. a node with only

            jcr:language="no"

            jcr:mixinTypes="[mix:language]"

            jcr:primaryType="nt:folder">

            otherwise empty.

            Or would that cause issues?

             

            Regarding 3.

            So if I cannot overlay it in /apps, I need to create these nodes in /libs ?

            Should not hurt, since we don't expect any more languages from Adobe for CQ 5.4 then?

            • 3. Re: i18n - how to add support for more languages (CQ 5.4)
              aklimets Adobe Employee

              2. Maybe the user does not have access to /etc/languages.

               

              3. /libs is overwritten on upgrades, updates and selectively by feature packs or hotfixes. So if there is no other way, make sure you capture (as package for example) and document the change you make to be able to reapply it.

              1 person found this helpful
              • 5. Re: i18n - how to add support for more languages (CQ 5.4)
                MeasurableBusinessResults Level 1

                Thanks for that hint, I checked it and the user does have read access to /etc/languages and /etc/tags and also /libs

                 

                So it seems the only workaround would be to create dummy nodes in /libs/wcm/core/i18n - which I did with a script (to be able to repeat after installation of hotfixes/and updates).

                 

                So for example for Norwegian:

                 

                # set default 2-letter node for norway (since it is missing)

                curl -u "admin:${PASS}" -X POST "http://${SERVER_IP}:${PORT}/libs/wcm/core/resources/languages/no" -d 'jcr:primaryType@TypeHint=Name' -d 'jcr:primaryType=nt:unstructured' -isS | grep HTTP

                curl -u "admin:${PASS}" -X POST "http://${SERVER_IP}:${PORT}/libs/wcm/core/resources/languages/no" -d 'country=*' -isS | grep HTTP

                curl -u "admin:${PASS}" -X POST "http://${SERVER_IP}:${PORT}/libs/wcm/core/resources/languages/no" -d 'defaultCountry=no_no' -isS | grep HTTP

                curl -u "admin:${PASS}" -X POST "http://${SERVER_IP}:${PORT}/libs/wcm/core/resources/languages/no" -d 'language=Norwegian' -isS | grep HTTP

                 

                # set dummy node for missing languages in /libs/wcm/core/i18n

                curl -u "admin:${PASS}" -X POST "http://${SERVER_IP}:${PORT}/libs/wcm/core/i18n/no" -d 'jcr:primaryType@TypeHint=Name' -d 'jcr:primaryType=nt:folder' -isS | grep HTTP

                curl -u "admin:${PASS}" -X POST "http://${SERVER_IP}:${PORT}/libs/wcm/core/i18n/no" -d 'jcr:mixinTypes@TypeHint=Name[]' -d 'jcr:mixinTypes=mix:language' -isS | grep HTTP

                curl -u "admin:${PASS}" -X POST "http://${SERVER_IP}:${PORT}/libs/wcm/core/i18n/no" -d 'jcr:language=no' -isS | grep HTTP

                 

                This does create a proper dummy node (which is otherwise empty) in /libs/wcm/core/i18n

                 

                But unfortunately the Norwegian language still does not show up in the translator tool /libs/cq/i18n/translator.html

                Only the standard languages show for my user.

                Admin user does see all langauges we have in /apps/site/i18n/publish (but that was already the case before) - so I assume it must be some permissions are missing. I also tried giving that user modify+create permissions to /apps/site/i18n/publish but that did not make any difference.

                 

                Any other ideas what could be missing?