2

I have created a menu on my site and have used features to export it. The first 2 menu items are translating to different languages but the third is not.

The third word is Contact. I have gone to /admin/config/regional/translate/translate and searched for Contact. I get the following.

enter image description here

At the bottom of my features it has

  // Translatables
  // Included for use with string extractors like potx.
  t('Contact');

So we can see that is there OK. When looking at my menu at /admin/structure/menu/manage/menu-example it is all in English. If I go to /fr/admin/structure/menu/manage/menu-example Contact remains in English and the other words change.

Contact is a mailto:link if that makes any difference.

  $menu_links['menu-teleplan_contact:mailto:[email protected]'] = array(
    'menu_name' => 'menu-example',
    'link_path' => 'mailto:[email protected]',
    'router_path' => '',
    'link_title' => 'Contact',
    'options' => array(
      'attributes' => array(
        'title' => '',
      ),
      'identifier' => 'menu-example_contact:mailto:[email protected]',
    ),
    'module' => 'menu',
    'hidden' => 0,
    'external' => 1,
    'has_children' => 0,
    'expanded' => 0,
    'weight' => -48,
    'customized' => 1,
  );

Why is the word in my menu not translating?

2
  • Are you using the i18n menu submodule to translate the menu? If so, which of the four options have you selected for translation? Commented Nov 1, 2013 at 10:10
  • @PatrickKenny no I am not using the sub module. I have enabled it but not sure what to do next
    – user13134
    Commented Nov 1, 2013 at 10:22

1 Answer 1

3
+25

I think you will find there is a conflict somewhere that is preventing the specific word (as it is a link) from being translated, and this submodule should overcome the conflict. I would utilise the "Menu Translation" submodule as it will specifically achieve what you are attempting above, and hopefully make it simpler! I would use the Translate and Localize Menus option (a detailed guide of how to do that is here)

If you are still stuck, and are using SuperFish for your menus (even though this is supported in i18n), there is a work around here and this may overcome the problem also.

Lastly, just in case, ensure you have this update, the most recent version, installed also.

3
  • Ah, typo, I meant to put the link for 1.10. Thank you for pointing that out, I've fixed it now.
    – KyleM
    Commented Nov 5, 2013 at 2:49
  • This seems to work. Just need to try and find a way to automate it in code...
    – user13134
    Commented Nov 7, 2013 at 10:27
  • Did you need to use the SuperFish work around? I will try and help you solve it programmatically and update my answer.
    – KyleM
    Commented Nov 7, 2013 at 23:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.