Add multilang support for custom header menu

Issue #609 resolved
Björn Bettzüche created an issue

The custom Header Menus don't support multilang.

Using the Moodle format as suggested doesn't work. Example 1:

Moodle Docs|http://docs.moodle.org|Moodle Docs|en
German Docs|http://docs.moodle.org/de|Documentation in German|de

Result: both entries are displayed in the menu.

Using the multilang-filter syntax for the menu title doesn't work. Example 2:

<span class="multilang" lang="en">Utilities</span><span class="multilang" lang="de">Nützliches</span>

Result: "UtilitiesNützliches" (and HTML-Markup in the tooltip)

Comments (5)

  1. Björn Bettzüche reporter

    Suggestion for fix (file renderers.php, function get_top_menus(), line 1510):

    $custommenuitems = $this->parse_custom_menu($menu, format_string($title));
    $custommenu = new custom_menu($custommenuitems, current_language());
    
  2. Info 3bits

    Could you create a PR with the change? We will test it and publish in next release.

    This is in the queue of pending tasks from long time ago (from BCU)

    Thanks for your collaboration

  3. Log in to comment