Login / Status
developer.Resource
Home . Documentation . Document Library . Extension Manuals
Sponsors
hosted by punkt.deTYPO3 and Open Source Magazine

3.2. Displaying the Language Selection on every page

If you want to include the Language Selection element on every page, there are two ways to do so.

You may proceed as follows:

  1. Create SystemFolder page and create a Language Selection content element on this page (as described above);

  2. Assume the uid of the content element of type Language Selection that you have just created is 456;

  3. Add the following lines to your TypoScript template:

temp.languageMenu = COA

temp.languageMenu {

10 = RECORDS

10.tables = tt_content

10.source = 456

}

  1. You may now assign  temp.languageMenu anywhere you want it to be displayed in your template; for example:

subparts.languageMenu < temp.languageMenu

A second method is as follows:

  1. Assume you have created language records with uids 1, 3 4 and 7, and that this list corresponds to the list of languages you want to select from; assume also that you want to display a selection list, rather than an array of flags;

  2. Add the following lines to your TypoScript template:

temp.languageMenu < plugin.tx_srlanguagemenu_pi1

temp.languageMenu.languagesUidsList = 1,3,4,7

temp.languageMenu.defaultLayout= 1

  1. As in the first method, you may now assign  temp.languageMenu anywhere you want it to be displayed in your template; for example:

subparts.languageMenu < temp.languageMenu