.. include:: /Includes.rst.txt .. _typoscript-configuration: TypoScript configuration ^^^^^^^^^^^^^^^^^^^^^^^^ A working multilingual site implies some TypoScript configuration in order to function properly. This is what is defined in the Introduction Package: .. code-block:: typoscript # Localization: config { linkVars = L(int) sys_language_uid = 0 sys_language_overlay = 1 # fall back to language 'da', then to 'de' and as last resort use 'en' sys_language_mode = content_fallback;2,1,0 language = en locale_all = en_US.UTF-8 htmlTag_setParams = lang="en" dir="ltr" class="no-js" } [globalVar = GP:L = 1] config { sys_language_uid = 1 language = de locale_all = de_DE.UTF-8 htmlTag_setParams = lang="de" dir="ltr" class="no-js" } [global] [globalVar = GP:L = 2] config { sys_language_uid = 2 language = da locale_all = da_DK.UTF-8 htmlTag_setParams = lang="da" dir="ltr" class="no-js" } [global] The properties used in the above snippet are discussed below, one by one. A link to the TypoScript reference is given for each of them. The :code:`config.sys_language_mode` and :code:`config.sys_language_overlay` properties are described more in detail in the :ref:`Localization modes chapter ` and the :ref:`Localized content chapter ` respectively. .. _typoscript-configuration-linkvars: The "&L" variable """"""""""""""""" The :code:`L` is used to pass the value of the language in the URLs. Although it is not a requirement to use :code:`L`, it is highly recommended because it is a common practice in the community and may even be hard-coded in some places. :code:`config.linkVars = L(int)` means that :code:`&L=x` will be added as GET request variable to every link generated by TYPO3 CMS and only integers are allowed as values as a security measure. If there are only a restricted number of values for :code:`L` - which is the case most of the time (like above :code:`0`, :code:`1` and :code:`2`) you can and should restrict this even further to :code:`config.linkVars = L(0-2)`. More examples can be found in the TypoScript Reference: :ref:`TypoScript Reference ` .. _typoscript-configuration-sys-language-uid: config.sys\_language\_uid """"""""""""""""""""""""" The :code:`config.sys_language_uid` property indicates to which system language each possible value of the :code:`L` GET variable corresponds (with :code:`0` for the default language). The value is the uid of the corresponding „Website language“ record. TypoScript conditions are used to make the definition vary with the value of the GET variable. These conditions also imply separate caches, which explains how caching supports and recognizes a change in the :code:`L` variable. :ref:`TypoScript Reference ` .. _typoscript-configuration-language: config.language """"""""""""""" This setting configures the system "language key" to be used for the language. This is used to select labels from XLIFF files. Setting this should make frontend plugins respond by showing labels from the correct language (requires :ref:`installation of the corresponding language packs `). :ref:`TypoScript Reference ` .. _typoscript-configuration-locale-all: config.locale\_all """""""""""""""""" Configures the locale which influences how some values from PHP are formatted in the output, e.g. dates formatted using :code:`strftime()` will output month/day names in the chosen language. :ref:`TypoScript Reference ` .. _typoscript-configuration-htmltag-setparams: config.htmlTag_setParams """""""""""""""""""""""" Setting the "lang" and "dir" attributes using this property will help with both browser rendering and content indexing. :ref:`TypoScript Reference `