Uploaded image for project: 'Magnolia Standard Templating Kit (closed)'
  1. Magnolia Standard Templating Kit (closed)
  2. MGNLSTK-500

The horizontal menu cannot be localized due to a hardcoded String in LinkImpl

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.2
    • 1.1
    • base system

      The menu in STK uses the navigationTitle property to store the text to show in the menu. I am using localisation in Magnolia and I noticed that this text could not be translated with adding the locale to the end of the property, for example: navigationTitle_de. When attaching a debugger I found that "navigationTitle" is hardcoded into info.magnolia.module.templatingkit.navigation.LinkTitle. See the code snippet below.

      public String getNavigationTitle(){
      String navigationTitle = node.getNodeData("navigationTitle").getString();
      return StringUtils.defaultIfEmpty(StringUtils.defaultIfEmpty(navigationTitle, node.getTitle()), node.getName());
      }

        Acceptance criteria

              pbaerfuss Philipp Bärfuss
              rdridder Ron de Ridder
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: