written by Daniel Pötzinger CTO
TYPO3 Localisation with TemplaVoila
TYPO3 Localisation with TemplaVoila
July 13, 2011 | Categories: Technologies & Open Source , Web Development , CMS & Portals
About author Daniel Pötzinger Daniel Pötzinger CTO

This article should give a compact summary of a possible best practice multilanguage configuration for TYPO3 together with TemplaVoila.

Precondition

Install the extension "languagevisibility" (see links below). This extension is required for the full localisation power. You may also want to have a look at the "l10n" extension that adds mass translation support.

Website Languages

Add the "website language" records under the TYPO3 page root and configure the desired fallback order. (typically you want to have at least "default" in you fallback order)

TSConfig

mod.SHARED { 
defaultLanguageFlag = us
defaultLanguageLabel = English - US
}
mod.web_txtemplavoilaM1.enableLocalizationLinkForFCEs = 1
mod.web_txtemplavoilaM1.hideCopyForTranslation >

TypoScript

 config {
sys_language_mode = ignore
sys_language_overlay = hideNonTranslated
sys_language_uid = 0
language=en
locale_all = en_US.utf8
...
}
...
[globalVar = GP:L = 1]
config {
sys_language_uid = 1
language = de
locale_all = de_DE.utf8
}
...
[end]
...

TemplaVoila Localisation Modi

TemplaVoila has 4 localisation modi:

  1. "Disabled" ( langDisabled = 1 )
  2. "Inlinetranslation" ( langChildren = 1 )
  3. "Inlinetranslation-seperate" ( langChildren = 0 )
  4. "databaseoverlay" ( langDatabaseOverlay =1 ) *

(* the mode "databaseoverlay" is added by the extension "languagevisibility" )

Container FCEs

You should use the mode "disabled" for all FCEs that act as pure containers:

 

<meta type="“array”" />
<noEditOnCreation>1</noEditOnCreation>
<langDisable>1</langDisable>
<default>
<TCEForms>
<sys_language_uid>-1</sys_language_uid>
</TCEForms>
</default>
...

This setup in the DS tells TYPO3 that this FCE should not be translated. And it tells TemplaVoila, that this FCE should not be edited and that the default value for the language field should be "All".

Content FCEs and mixed FCEs

The typical FCEs have fields with some content, that needs to be localised. You should use the mode "databaseoverlay". (Inlinetranslation support has two big disadvantages: 1. No concurrent work on languageversions in workspaces and 2. bad usability)

 

<meta type="“array”" />
<langDisable>1</langDisable>
<langDatabaseOverlay>1</langDatabaseOverlay>
...

If your FCE has translatable content and also container fields that allows for further nesting you need to configure the container fields in a way that it always uses the default language content:

 

<field_content type="array">
...
<TCEforms type="array">
<l10n_mode>exclude</l10n_mode>
...
</TCEforms>
</field_content>
...

If your FCE has translatable content that is not required, you may want to fall back to the default language if this field has no content. This is useful for Images for example:

 

<field_image type="array">
...
<TCEforms type="array">
<l10n_mode>mergeIfNotBlank</l10n_mode>
...
</TCEforms>
</field_image>
...

 

(* the "l10n_mode" support for flexforms  is added by the extension "languagevisibility" )

page DS

<meta type="“array”" />
<langDisable>0</langDisable>
<langChildren>1</langChildren>
...

This configuration enables the inline localisation for any TemplaVoila page property.

(In addition you have the possibility the maintain a completely own contentelement structure on pages for certain languages)

Special Attention

  • don't forget to check your correct UTF8 setup. (If TYPO3 version is below 4.5 you need to set "forceCharset = utf-8" and maybe also setDBInit )
  • TYPO3 uses the language ISO code as key for inlinetranslation in flexforms. If you have multiple localizations per language you need to add additional pseudo ISO codes. ( Read more in a related article "multilanguage websites with same language")

Links: Extension languagevisibility on forge