Îñţérñåţîöñåļîžåţîöñ
Localization and Internationalization using TYPO3

                    Alexander Wahl
Agenda

>   Challenges in internationalization projects
>   localize TYPO3
>   extensions from TER dealing with translation
>   promote your translations to Google
Company profile - digiparden

>   Employees: 15 human beeings , 2 cats
>   Location: Schwäbisch Gmünd
>   Customers: DAIMLER, Mercedes-Benz, TRUMPF, LAPPGROUP, FUSO
>   Expertise in
    – content-management
    – language management
    – product-data management
    – application development using TYPO3, FLOW3 and ZF
    – IT-consulting
Internationalization vs. Localization

Internationalization
> Process of designing a software application to adapt to various
    regions and languages without engineering changes
> Synonym’s:
    – globalization
    – “world-readiness” (Microsoft)


Localization
> Process of adapt a internationalized software product to a specific
   market by adding
   – translations
   – regional content (e.g. images, colors, )
   – locale-specific information (e.g. time, currency, etc.)
Challenges in
 internationalization projects



http://www.flickr.com/photos/marcelgermain/3840003650/sizes/o/in/photostream/ (picture by Marcel Germanin)
Challenges in internationalization projects
Localization is a time consuming project

19.800 pages      260.000 content objects   15 target languages

Exporting content manually
1 month, 2 weeks, 3 days and 3 hours

Importing content manually
1 year, 3 months, 3 days and 6 hours
approx. 1.634.700 words
localize TYPO3




http://www.flickr.com/photos/51035610542@N01/6868716258/ (picture by cszar)
localize TYPO3
TYPO3 configuration
TypoScript setup
TCA configuration
TYPO3-Core methods
Application labels (XLIFF)
Tipps and tricks
Basic setup

Character sets
$TYPO3_CONF_VARS['BE']['forceCharset'] = 'utf-8‘

Database connection
$TYPO3_CONF_VARS['SYS']['setDBinit']= ‘
SET CHARACTER SET utf8;
SET NAMES utf8;
SET SESSION character_set_server=utf8‘;

Database field size
$TYPO3_CONF_VARS['SYS']['multiplyDBfieldSize'] = '3';

Filesystem
$TYPO3_CONF_VARS['SYS'][‘UTF8filesystem'] = true;
Setting up languages
Frontend languages




Optional
config.sys_language_softMergeIfNotBlank
config.sys_language_softExclude
Extension development - database setup
Extension development - database setup
Extension development – TCA configuration
Extension development – TCA magic (l10n_mode)




L10n_mode: mergeIfNotBlank, exclude, NoCopy and prefixLangTitle
L10n_display: hideDiff, defaultAsReadonly
L10n_cat: text,media
@see doc_core_tca
Extension development – flexform
                                   disable language handling
                                   in flexform
Frontend development
Frontend development




                       better solution
Frontend development




                       better solution
Frontend development - extbase/fluid
Frontend development - XLIFF




Overriding XLIFF Localization Files
$GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride][]

Clearing XLIFF-Cache
$TYPO3_CONF_VARS['SYS']['lang']['cache']['clear_menu'] = TRUE;

Parsing XLIFF-Files - TYPO3 4.6
t3lib_l10n_parser_Llxml::getParsedData($sourcePath, $languageKey, $charset = '')
@deprecated
t3lib_div::readLLXMLfile
Tips and tricks

Adding fields from pages to pages_language_overlay
$GLOBALS['TYPO3_CONF_VARS']['FE']['pageOverlayFields']

disable translations in list-view
mod.web_list.hideTranslation = * or list of tables

overriding locallang via TypoScript
plugin.[name]._LOCAL_LANG.[ISO2]{
key = value
}

Hide pages if no translation exists
$GLOBALS['TYPO3_CONF_VARS']['FE'][‚hidePagesIfNotTranslatedByDefault'] =
boolean
Tips and tricks

Useful methods
$GLOBALS[‘TSFE’]->sys_page->getRecordOverlay($table, $currentRow,
$sys_language_uid);
$GLOBALS[‘TSFE’]->sys_page->getPageOverlay($row, $sys_language_uid);
t3lib_BEfunc::getRecordLocalization($table, $uid, $sys_language_uid);
t3lib_Befunc::isTableLocalizable($table);
t3lib_transl8tools::getSystemLanguages($page_id);
t3lib_transl8tools::translationInfo($table, $uid, $sys_language_uid);
extensions from TER
 dealing with translation



http://www.flickr.com/photos/41864721@N00/4743121155/ (picture by ecstaticist)
Ext:language visibility

>   multilanguage fallbacks
>   fallback configuration per language
>   visibility concept for single pages, content elements and news
Ext:l10nmgr - overview

>   Online translation via TYPO3 backend
>   Offline translation via XML (DéjàVu, memoQ, SDL TRADOS TagEditor, SDL
    Trados Studio 2009, SDL PASSOLO) and ms Excel format
>   Automation for different parts of the website and for multiple target
    languages
>   CLI-support
>   Up- and downloading exchange-files via FTP
Ext:l10nmgr - configuration
Ext:l10nmgr – online translation
Ext:l10nmgr – offline translation
Ext:snowbabel

Extension translation for content-managers and non-technical backend-users
Promote translations
 to Google



http://www.flickr.com/photos/e2/4650891118/ (picture by eisenrah)
URL structures




http://googlewebmastercentral.blogspot.de/2010/03/working-with-multi-regional-websites.html
Multi-lingual and multi-regional websites

Sitemap
Provide Sitemap in default language

Google ignores “lang” attributes and DTD definitions
<html lang="en-US" class="page-content">

Working with character encodings
Use UTF-8 as encoding




http://support.google.com/webmasters/bin/answer.py?hl=de&answer=139394
Multi-lingual and multi-regional websites

Crawling and indexing your multilingual and multiregional website
> Avoid crawling of automated translations
> Provide cross-links between the different languages
> Avoid automatic redirections based on the user’s perceived language
> Don’t use cookies to show translated versions
> Use rel="alternate" hreflang="x" to target other languages or other
   regions
> Use rel= "canoncial" href="x" to point to the main language
   – Canoncial en_US >> alternate en_GB or en_AU




http://support.google.com/webmasters/bin/answer.py?hl=de&answer=139394
Conclusion
Conclusion

Localization projects are difficult because
› of the complexity
› many people involved into the process
› the knowledge in different knowledge fields



with TYPO3 you have a great , internationalized, software product to succeed

Internationalization with TYPO3