Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-16226

Translation of custom admin menu items - improved

    XMLWordPrintable

Details

    Description

      If I understood well from http://issues.ez.no/15672 and its related commits in the SVN repository, the only way to translate custom menu items is to override the menu.tpl of the particular menu (for example parts/setup/menu.tpl) and customize the i18n_hash parameter passed to the

      {include}

      call.

      If you have multiple extensions, this will make it again impossible for each of them to easily add a translatable menu item.

      I have a suggestion that might be better to get this working properly:

      • put the titles of the menu items also in the menu INI file
      • make a dummy template file, containing the menu item titles piped through i18n(). The only reason for having this template file is to make ezlupdate pick up up the titles as translatable strings.
      • adapt all menu.tpl files and ini_menu.tpl, so that for menu items it uses the corresponding title from the menu INI file, piped through i18n (or maybe a new i18n variant, i18n_dynamic, that is not picked up by ezlupdate)

      now if you want your extension to add a menu item, you just need to do this:

      • add settings to menu.ini.append.php
      • add a dummy template file containing the menu item titles piped through i18n

      Attachments

        Activity

          People

            andre1 andre1
            cyberwolf cyberwolf
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: