You are here

README.txt in Menu translation - Node 7

Menu translation (Node) allows a single node menu item to point to different 
node translations belonging to the same translation set depending on the 
current language.

In conjunction with the Menu translation module, shipped with the 
Internationalization (i18n) project [1], it allows to have a fully translated 
menu without needing to replicate the node menu items per language.

USAGE
-----

Enable Menu translation (Node), create a node menu item and check the "Enable 
node translation" checkbox on the menu item editing or node form. You can 
change the default value of the checkbox for a specific menu in the menu edit 
form.

When node translation is enabled for a translation set, the edit form of the 
source node will show the usual menu item form. The node translations instead 
will have a textfield allowing to translate the menu item title through the 
String translation feature of the i18n project [1].

Note that if you need to translate titles into the default language you need to
add the following line to your settings.php:

$conf["i18nstrings_translate_langcode_$langcode"] = TRUE;

where $langcode is the language code of the default language.

Note also that node translation works only for node types having translation
support enabled.

People using Menu Translation (Node) for the first time might experience some
problems in making it work properly. The main cause of these problems is the
language selection feature of the Internationalization project. Language
selection is designed to hide from node listings nodes not matching the
configured criteria. Due to how the menu system internals work, language
selection is applied also to menu items pointing to nodes, therefore if a site
is not set up correctly, its menus might not work as intended.

To work around this problem Menu Translation (Node) provides two ways which
share the same basic concept: temporarily disabling language selection while
rendering the menu tree.

- The first method is transparent to the user and concerns primary and secondary
links directly output in the page template through the $primary_links and
$secondary_links variables. If they are enabled in the theme settings, both
variables should contain the correct menu output without incurring in language
selection problems.
- The second method concerns menu blocks and requires the user to replace the
usual menu blocks with their [i18n] version, which can be found in the blocks
administration page as usual. Note that if primary/secondary links variables are
enabled through the theme settings (even if they are not actually output in the
page template), the corresponding menu blocks will work without needing to be
replaced with their [i18n] version. This is due to the fact that the (correct)
menu tree is computed just once and then reused by all the code needing it. For
the same reason also the menu blocks provided by Menu Block [2] will work only
if they involve primary or secondary links.

If you still cannot get everything working one possible reason is you just found
a bug, but please be sure to have explored the other possibilities.

DEPENDENCIES
------------

This module depends on the Menu translation module shipped with the i18n 
project [2].

CREDITS
-------
The initial development of this module has been sponsored by psegno [3].

LINKS
-----

[1] http://drupal.org/project/menu_block
[2] http://drupal.org/project/issues/i18n
[3] http://www.psegno.it

File

README.txt
View source
  1. Menu translation (Node) allows a single node menu item to point to different
  2. node translations belonging to the same translation set depending on the
  3. current language.
  4. In conjunction with the Menu translation module, shipped with the
  5. Internationalization (i18n) project [1], it allows to have a fully translated
  6. menu without needing to replicate the node menu items per language.
  7. USAGE
  8. -----
  9. Enable Menu translation (Node), create a node menu item and check the "Enable
  10. node translation" checkbox on the menu item editing or node form. You can
  11. change the default value of the checkbox for a specific menu in the menu edit
  12. form.
  13. When node translation is enabled for a translation set, the edit form of the
  14. source node will show the usual menu item form. The node translations instead
  15. will have a textfield allowing to translate the menu item title through the
  16. String translation feature of the i18n project [1].
  17. Note that if you need to translate titles into the default language you need to
  18. add the following line to your settings.php:
  19. $conf["i18nstrings_translate_langcode_$langcode"] = TRUE;
  20. where $langcode is the language code of the default language.
  21. Note also that node translation works only for node types having translation
  22. support enabled.
  23. People using Menu Translation (Node) for the first time might experience some
  24. problems in making it work properly. The main cause of these problems is the
  25. language selection feature of the Internationalization project. Language
  26. selection is designed to hide from node listings nodes not matching the
  27. configured criteria. Due to how the menu system internals work, language
  28. selection is applied also to menu items pointing to nodes, therefore if a site
  29. is not set up correctly, its menus might not work as intended.
  30. To work around this problem Menu Translation (Node) provides two ways which
  31. share the same basic concept: temporarily disabling language selection while
  32. rendering the menu tree.
  33. - The first method is transparent to the user and concerns primary and secondary
  34. links directly output in the page template through the $primary_links and
  35. $secondary_links variables. If they are enabled in the theme settings, both
  36. variables should contain the correct menu output without incurring in language
  37. selection problems.
  38. - The second method concerns menu blocks and requires the user to replace the
  39. usual menu blocks with their [i18n] version, which can be found in the blocks
  40. administration page as usual. Note that if primary/secondary links variables are
  41. enabled through the theme settings (even if they are not actually output in the
  42. page template), the corresponding menu blocks will work without needing to be
  43. replaced with their [i18n] version. This is due to the fact that the (correct)
  44. menu tree is computed just once and then reused by all the code needing it. For
  45. the same reason also the menu blocks provided by Menu Block [2] will work only
  46. if they involve primary or secondary links.
  47. If you still cannot get everything working one possible reason is you just found
  48. a bug, but please be sure to have explored the other possibilities.
  49. DEPENDENCIES
  50. ------------
  51. This module depends on the Menu translation module shipped with the i18n
  52. project [2].
  53. CREDITS
  54. -------
  55. The initial development of this module has been sponsored by psegno [3].
  56. LINKS
  57. -----
  58. [1] http://drupal.org/project/menu_block
  59. [2] http://drupal.org/project/issues/i18n
  60. [3] http://www.psegno.it