ATTENTION ATTENTION
gear.huuah.com has launched. Visit the shop at http://gear.huuah.com/. Lots of Photo Gear at the moment
ATTENTION ATTENTION
Itsplanned.com is just launched! - Task and project management made easy. Try it for free.

Create your own lists of things to do - arrange the order to do them - move them around - group them

No limitations - all free project management - try the free demo before signing up - demo: itsplanned.com
Multi language setup in TYPO3
29.07.2009

If you are building a site, which should support more than one language, there are two ways of doing this. Okay, perhaps there are more than two, but I will only give two examples.

The two I will cover is:
1. Manually adding language page
2. Integrated TYPO3 language support

1. Manually adding language page

This I will only touch briefly, as the solution should be obvious when the layout is presented. It should be very easy. Just create a tree like this and manually do the linking:
Manually Language Setup
That’s it.

2. Integrated TYPO3 language support

This is quite different compared to the first setup. We will be using the built-in language support in TYPO3, based on a tree structure like this:
Tree structure for a TYPO3 language setup

First step is to create the languages and this is done by selecting list, clicking your site in the tree structure and then adding a website language:
Adding a website language step 1
Adding a website language step 2

Then create the number of languages needed for the site.
Adding a website language step 3

Second step is the template configuration. Before doing this, we have to check which id numbers the languages has been given. This is done by selecting list on your site (just as when we created the languages) and the hover your mouse above each language:
Adding a website language step 4 - getting the language id
When this is done, then go to the template setup field and enter the following:

config.sys_language_overlay = hideNonTranslated
config.linkVars = L

[globalVar = GP:L=en]
  config.sys_language_uid=2
  config.language = en
[global]

[globalVar = GP:L=dk]
  config.sys_language_uid=1
  config.language = dk
[global]

What this does is:
config.sys_language_overlay = hideNonTranslated will hide a page or content element, if is does not have content for the specific site. Remove or outcomment this, if you want all elements displayed.
config.linkVars = L is the parameter used in the url for selecting language. Ie http://domain.tld/index.php?id=2?L=dk
[globalVar = GP:L=dk] a section like this, configures the language based on the parameter passed by the linkVars. Here it will trigger on L=dk
config.sys_language_uid=1 this will join the dk-parameter with the language id 1, which we found earlier.
config.language = dk this will set the page language for dk

Third and final step is to configure a page to use the new languages. This is done by selecting list, clicking the page and adding an Alternative Page Language
Adding a website language step 5
Adding a website language step 6
Then select which language you want to create a page for, type in the page title and save it.
Adding a website language step 7
We are now ready for translating the page. When editing an element on the newly configured page, there is now a new option in the top of the page. Select the new language and type in the translation.
Adding a website language step 8

That’s it. TYPO3 will now display the Danish content when visiting the page with the L=dk parameter in the url.

9 Responses to “Multi language setup in TYPO3”

  1. Michael Cannon Says:

    Thank you for the this straight forward how-to on enabling multiple languages with TYPO3. Please keep these helpful articles coming.

  2. shadi Says:

    Hello Michal

    Good tutorial
    But i have problem when try to change language in fronted
    only change menu but content not changed
    how i can solve it ?

  3. js - huuah Says:

    Have you entered a translated text for the content on the webpage, as shown in the very last screenshot?

  4. Sam Says:

    Hi,

    Thanks, this helps me a lot. I am new in developing typo3. Keep writing…:)
    Thanks again.

  5. rey Says:

    HI

    Thanks for the wonderfull article but i’m having some problem in showing languages in default tab i.e step 5

    The default tab is not populated with languages i created
    Can somebody help me plz???

    regards

    rey

  6. Dave Says:

    Thanks a lot, that helped me…

    But how can I change the default language, or completely remove english?

  7. sander de graaf Says:

    Same problem here, the url is changing but not the translated content!! Thinks it has something todo with a typo 4.3.9 installation. Found a page where they say you will need a FCE element…

    http://wiki.typo3.org/TemplaVoila#TemplaVoila_localization

    Would be nice to have a tutorial the way this one is build: Simple and clear!

    thanks in advance

  8. Monis Says:

    Thanks for such a nice and in detailed article on multilingual concept, today I was stuck as i missed something/step but your article helped me a to break the crisis.

    thanks again!
    Monis

  9. strus Says:

    Hi, i got a question about multilanguage and TV, is there any possibility to get alternative template for different languages? Thats something i need to finish my page.

    By the way, thanks for great tut! its really helpfull! :)

Leave a Reply