.. include:: /Includes.rst.txt .. _language-menu: ======================= Language selection menu ======================= To properly navigate a multilingual web site you probably want to have a language selection menu somewhere. This menu should show an entry for each possible, with variation of aspect depending on translation availability: * Translation exists * Translation exists - currently selected * Missing translation * Missing translation - currently selected This kind of menu can be made by either using a :ref:`LanguageMenuProcessor ` on a :ref:`FLUIDTEMPLATE ` or using the :ref:`HMENU content object ` with special type :ref:`language `. .. _language-menu-tmenu: LanguageMenuProcessor example ============================= The `Introduction Package`_ comes with a text-based rendering of the language menu, located in the footer: .. figure:: /Images/ManualScreenshots/Frontend/LanguageMenuText.png :alt: Text-based language menu :class: with-shadow A text-based language menu, with active and disabled states This is the corresponding TypoScript code, that sets up a `LanguageMenuProcessor` on the page level: .. code-block:: typoscript :caption: EXT:site_package/Configuration/TypoScript/setup.typoscript page = PAGE page { 10.dataProcessing { 40 = TYPO3\CMS\Frontend\DataProcessing\LanguageMenuProcessor 40 { languages = or "auto" as = languagenavigation } } } The value for :typoscript:`languages` is a list of comma-separated language IDs (for example: :typoscript:`0,1,2`) or :typoscript:`auto` to load from :ref:`site configuration `. The menu is then passed as a hierarchical array to :ref:`Fluid ` in the variable :html:`{languagenavigation}`. The Fluid template iterates through the array and creates the language links: .. code-block:: html :caption: EXT:site_package/Resources/Private/Templates/SomeTemplate.html .. _Introduction Package: https://extensions.typo3.org/extension/introduction