Subscribe to Acqal
Got Thoughts? Write Us!
Approved TYPO3 Agency
Acqal is an approved TYPO3 agency focusing on support, training and website migration.
This means that we...
- are available on TYPO3.org
- make substantial contributions to TYPO3 teams
- are registered as business members of the TYPO3 Association
- have completed more than four TYPO3 projects
- have proven our technical abilities with quality TYPO3 extensions
- use TYPO3 for our own website
Popular Blog Posts
Tech Tuesday Went Snowboarding at T3BOARD09
TYPO3 and Other Open Source WCM Systems Dissed Again
Automatic tt_news META descriptions via Acqal's extension aqnewsmeta
TYPO3, comments and Gravatar via Acqal's extension comments_gravatar
TYPO3 Extension cbstarter Version 1.3.2 Released
Sunday at T3BOARD09 in Laax, Switzerland
Not Good, Not Bad, Just Different
Increase TYPO3 Workspace Relation Limits
Getting Help With TYPO3
Looking into TYPO3 Webhosting?
Blog Topics
Virgil on Twitter
Please wait while virgilhuston tweets load 

Recent Blog Posts
US Political Campaign Websites - The Basics
My Talk at T3CON10 Dallas - TYPO3 User jobs and Tasks
Dallas Barbeque Joint Reviews
T3CON10 Dallas
Acqal is Going Through Some Changes
Creating a MySQL Database for TYPO3 using CPanel
Acqal Promotes Biking and Families with World Vision
It's Official T3CON10-Dallas Web Site Launched! Join Us!
Create a simple "Contact Us" mail form in TYPO3
Configure TYPO3 for Localized Websites
Blog Archives
Configure TYPO3 for Localized Websites
Tuesday, December 29, 2009 12:01 AM EST
A bit older of a multi-lingual setup guide, but the principals are the same.
The information below is over a year old, circa mid-2008. Some of the techniques and settings may have changed for TYPO3 4.2 and TYPO3 4.3. I'll release an update to this in early 2010.
- Website Language Creation
- On the TYPO3 Global page via List mode, add a new Website Language. Take note of the uid of that language. To do so, hover over the Website Language icon after saving and closing to see the uid. You'll need this for the sys_language_uid setting later on.
- TypoScript Localization by URL or L Parameter
- If you do not have the cbstarter extension installed, put Section A into your main website TypoScript template Setup area. Otherwise, put Section A into your main website TypoScript template Constants area.
- Put Section B into your main website TypoScript template Setup area, below Section A.
- Based upon the URLs or domain names specific to your website and website languages, edit the Section A and Section B config.baseURL and sys_language_uid entries.
- config.locale_all
- Configures the locale which influences how some values from PHP is formated in the output, eg. dates formatted using strftime() which will then output month/day names in that language.
- Refer to the ICU User guide to format the locale_all entry.
- Refer to the ISO 639-2 Code List for the language code.
- Refer to ISO 3166 for the country code.
- config.language
- Configures the system “language key” to be used for the language. This is used to select labels from llXML (locallang-XML) files. Setting this should make frontend plugins respond by showing labels from the correct language (requires installation of the corresponding language packs).
- config.htmlTag_langKey
- Changes "xml:lang" and "lang" attributes in the <html> element.
- UTF-8 Configuration
- If you do not have extension cbstarter installed, put Section C into your main website TypoScript template Setup area. Otherwise, put Section C into your main website TypoScript template Constants area.
- Put Section D into your typo3conf/localconf.php file.
- RealURL Configuration
- Edit your realurl configuration to include a preVars > getVars > L entry.
- See Section E for a sample.
- Click "Clear all caches" for your TYPO3 installation.
- Create localized content
- Basic process
- Create alternative page language record
- Via Web > Page (TemplaVoila), click the "Create localized version" link on each content element you desire localization of.
- Via Web > Page, click the create new content icon, and set the language drop-down.
- Refer to the references for creating content in detail.
- Basic process
Section A - TypoScript Localization by URL
config.baseURL = www.cannonbose.com
# SSL is for cannonbose.com
[globalString = _SERVER|HTTPS=on]
config.baseURL = https://www.cannonbose.com/
[end]
Section B - TypoScript Localization by URL or L Parameter
config {
linkVars = L
uniqueLinkVars = L
sys_language_mode = content_fallback
sys_language_overlay = 1
sys_language_softMergeIfNotBlank = tt_content:image, tt_content:header
sys_language_uid = 0
locale_all = en_US
language = en
htmlTag_langKey = en-us
}
# French
[globalVar = GP:L = 1]
config.sys_language_uid = 1
config.locale_all = fr_FR
config.language = fr
config.htmlTag_langKey = fr
# Chinese (Simplified)
[globalVar = GP:L = 2] || [globalString = _SERVER|HTTP_HOST= *.cn]
config.sys_language_uid = 2
config.locale_all = zh_CN
config.language = cn
config.htmlTag_langKey = zh-cn
config.baseURL = www.cannonbose.cn
# Chinese (Traditional)
[globalVar = GP:L = 3] || [globalString = _SERVER|HTTP_HOST= *.tw]
config.sys_language_uid = 3
config.locale_all = zh_TW
config.language = tw
config.htmlTag_langKey = zh-tw
config.baseURL = www.cannonbose.com.tw
[end]Section C - TypoScript UTF-8 Configuration
config.renderCharset = utf-8
config.metaCharset = utf-8
Section D - localconf.php UTF-8 Configuration
$TYPO3_CONF_VARS['BE']['forceCharset'] = 'utf-8';
Section E - realurl.php Sample Configuration
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['preVars'] = array(
array(
'GETvar' => 'L',
'valueMap' => array(
// 'english'
'en' => '0',
// 'french'
'fr' => '1',
// chinese simplified
'cn' => '2',
// 'chinese traditional
'tw' => '3',
),
'noMatch' => 'bypass',
),
);
References
Extensions
Keywords:
- typo3,localized websites,localization,internationalization,typoscript


Add comment
* - required field