Building multilingual websites in
Drupal and Joomla!
Jim DeLaHunt
multilingual websites consultant (jdlh.com), Vancouver,
Canada
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
About us
Jim DeLaHunt (jdlh.com)
Consultant, multilingual websites
Vancouver, Canada
Specialty: multilingual websites
Was: Adobe Systems and SING gaiji
architecture, to mid-2005
Joomla! expert, Drupal student
18. October 2010 Building m11l Drupal and Joomla! sites 2
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Agenda
Introduction to CMSs, Drupal, Joomla!
Multilingual site design issues
Installing a multilingual site (both D&J)
L10n of UI, content, templates, modules
L10n status of key modules
Demos
Q&A
18. October 2010 Building m11l Drupal and Joomla! sites 3
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Survey: what do you want today?
Please introduce yourself and your interest in
this topic. What do you want?
How familiar with Drupal, Joomla? (0..4)
How much experience setting up, running
multilingual web sites?
Cover drupal, joomla, both? (D..both..J)
Talk vs demo: balance?
18. October 2010 Building m11l Drupal and Joomla! sites 44
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Introduction to CMSs, Drupal,
Joomla!
18. October 2010 Building m11l Drupal and Joomla! sites 4
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Drupal 6 and Joomla! 1.5: similar
CMS (Content Mgmt.
System)
PHP + database
(MySQL)
Core system +
extensions
GNU GPL License
18. October 2010 Building m11l Drupal and Joomla! sites 5
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Showcases
drupal.org/cases, drupalsites.net
cai.org (en, de, fr, nl, ru, ..., el)
interfax.net, toughbook.eu, jvisusallc.com
community.joomla.org/showcase
ushakamarineworld.co.za (en, af, +4)
storfjordens-venner.no (nb, en)
hispeed.nl, siberian-baikal.com
18. October 2010 Building m11l Drupal and Joomla! sites 6
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Where to find Joomla!
Community www.joomla.org
Forums forum.joomla.org
Extensions extensions.joomla.org
directory
Localisation extensions.joomla.org/extensions/
languages/translations-for-joomla
Documen-tation docs.joomla.org
18. October 2010 Building m11l Drupal and Joomla! sites 7
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Where to find Drupal
Community drupal.org
Forums drupal.org/forum
Extensions drupal.org/project/modules
directory
Localisation localize.drupal.org/
Documen-tation drupal.org/handbooks
18. October 2010 Building m11l Drupal and Joomla! sites 8
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Architecture overview
index.php: fw_lang.ini,.po template
$_GET[ ]...
framework(...); framework.php:
fw_function1();
module1();
fw_function2(); mypage.html:
.... <HTML>
...
</HTML>
database:
fw_table... module1.php:
mod1_table... mod_stmt1();
mod_function2();
....
mod_lang.ini,.po
18. October 2010 Building m11l Drupal and Joomla! sites 9
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Architecture overview
Every page comes from running index.php
with arguments
Index.php calls framework
Framework calls modules
Some page content comes from:
PHP code of framework, modules
Database records (via framework, modules)
18. October 2010 Building m11l Drupal and Joomla! sites 10
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Multilingual site design issues
18. October 2010 Building m11l Drupal and Joomla! sites 11
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Structure and Design
Site domain structure
Multiple sites by TLD: .cn, .de, .рф
3LD subsites: fr.wikipedia.org
Language codes in URL: /es/
18. October 2010 Building m11l Drupal and Joomla! sites 12
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Structure and Design
Navigation best practices
Consistent visual design across geos
Consistent navigation structure
Globe map splash screen lets user choose
See Improving the Global Gateway
John Yunker, Tues Oct 19, 10:30h, Track 1
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Language- or geo-primary
Language-primary
Wikipedia
Bank of Canada
Geo-primary
Many corporate sites, e.g. Caterpillar
Google maps
Hybrid
e.g. Google Search
18. October 2010 Building m11l Drupal and Joomla! sites 14
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Other design factors
Search engine friendliness
Human-friendly URLs
Title, Meta tags
I18n and l10n of web application
Localise UI
Dates, currencies, icons, ...
UI language <> Content language
Underlying text in Unicode, of course
18. October 2010 Building m11l Drupal and Joomla! sites 15
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Multilingual URLs
http://zh.wikipedia.org/zh/ 天安门广场
…:// 中文 . 维基百科 . 中国 / 天安门广场
Different i18n situations in URL:
3+ld.2ld.tld/path#anchor?query
http://zh.wikipedia.org/zh/%E5%A4
%A9%E5%AE%89%E9%97%A8%E5
%B9%BF%E5%9C%BA
18. October 2010 Building m11l Drupal and Joomla! sites 16
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Language versions of content
I18n support adds language tags to DB
Allow language alternates for each content item
Look up by lang. tag as well as by item id
Static content: use string resource tools
Human-friendly URLs
Title & Meta text
18. October 2010 Building m11l Drupal and Joomla! sites 17
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Detecting language and
geography
Try any or all of:
User request (language, geo menus)
Browser request: HTTP Accept-Language
Top-level domain: .cn, .de
Geocoding the IP address
Language codes in URLs: /en/, /zh_CN/
Remember with cookie for future visits
18. October 2010 Building m11l Drupal and Joomla! sites 18
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Installing a multilingual Drupal site
18. October 2010 Building m11l Drupal and Joomla! sites 19
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Foundations
Start with Drupal 6
Drupal 7 still a bit raw, Drupal 5 is stale
Clean install
Adding in language codes, URLs for old content is
much more complex
Need capability to add other modules
“Multilingual Drupal” installation profile
18. October 2010 Building m11l Drupal and Joomla! sites 20
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
International modules
Internationalization - framework
http://drupal.org/project/i18n
Language Icons – language links
Translation Overview – see status
Localization Client – for user strings
More at drupal modules...“Multilingual”
http://drupal.org/project/modules/category/97
18. October 2010 Building m11l Drupal and Joomla! sites 21
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Confusing vocabulary
“Add languages” = register language for use
“Translate” = make copy of node for
translator to put new text into
Read Internationalization: Build
Multilingual Sites
http://drupal.org/node/133977
18. October 2010 Building m11l Drupal and Joomla! sites 22
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
System configuration
Language negotiation: path prefix, language
fallback, domain name
Confirm language prefix for default language
Add user permissions to role(s) for
international etc. modules
Content type multilingual support: enabled,
with translation
18. October 2010 Building m11l Drupal and Joomla! sites 23
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Installing modules
From core: Locale, Content translation,
Path
Install all, update, enable modules
18. October 2010 Building m11l Drupal and Joomla! sites 24
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Installing a multilingual Joomla!
site
18. October 2010 Building m11l Drupal and Joomla! sites 25
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Installing a multilingual Joomla!
Site
Start with Joomla 1.5
Joomla 1.6 is not yet ready, 1.0.x is stale
Language: Joom!Fish 2.0.x
URLs: sh404SEF (or JoomSEF?)
Keep your eye on: Nooku (in place of Joom!
Fish)
18. October 2010 Building m11l Drupal and Joomla! sites 26
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
L10n of UI
18. October 2010 Building m11l Drupal and Joomla! sites 27
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
L10n of UI (Drupal)
Upload and install translation packs before
“add language”
To get translation files registered properly
Then, “add language”
18. October 2010 Building m11l Drupal and Joomla! sites 28
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
L10n of UI (Joomla)
Upload and install translation archive using
Extensions... Install/Uninstall
Select default: Extensions... Language
Manager
Menu items are content (see below)
Fix untranslated UI by editing language .ini
files or .php source(!)
18. October 2010 Building m11l Drupal and Joomla! sites 29
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
L10n of content
18. October 2010 Building m11l Drupal and Joomla! sites 30
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Add and translate content
(Drupal)
Enter new content (specify language)
Translation overview
Click “translate” link to translate
Advanced topics
Metadata, menus, etc
Linking to translation management system
18. October 2010 Building m11l Drupal and Joomla! sites 31
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Translate content (Joomla)
Enter new content via Module's UI
Components... JoomFish to translate
Advanced topics
Metadata, menus, etc
Translation status
18. October 2010 Building m11l Drupal and Joomla! sites 32
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
L10n of templates
18. October 2010 Building m11l Drupal and Joomla! sites 33
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
How templates work
Called by framework
Generate structural HTML
Including placeholders at which framework
calls module for HTML
Includes images, CSS for formatting
Written in stylised PHP
18. October 2010 Building m11l Drupal and Joomla! sites 34
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
L10n of templates
Well-designed templates will have no hard-
coded text
Static text by editing .ini/.po files
Text which is controlled by template
configuration
L-to-R, R-to-L formatting by template, and by
module
18. October 2010 Building m11l Drupal and Joomla! sites 35
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
L10n of modules
18. October 2010 Building m11l Drupal and Joomla! sites 36
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
L10n of modules
Module needs to be aware of translation
module, or its content won't be listed
Modules frequently have “translations” of
static text in .ini/.po files
Modules sometimes have “templates” which
control own content layout
Some templates need code for specific
modules
18. October 2010 Building m11l Drupal and Joomla! sites 37
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
L10n status of important modules
18. October 2010 Building m11l Drupal and Joomla! sites 38
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Key Joomla extensions
Per “editor’s picks” in Joomla Extensions
6 of 9 are n/a, not user facing
Community Builder: 33 (24)
Mosets Hot Property: 13
VirtueMart: 37 (31)
18. October 2010 Building m11l Drupal and Joomla! sites 39
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Summary
Drupal, Joomla! are both strong, largely similar
tools (with own strengths and weaknesses)
Drupal 6 has great support
Need to install extra modules and configure
Joomla! 1.5 also strong
Also need extra modules
Demo of content entry, translation, etc.
18. October 2010 Building m11l Drupal and Joomla! sites 40
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Q&A
Questions?
Handouts:
http://jdlh.com/en/doc/2010/tutorial_drupal_joomla_iuc34.html
18. October 2010 Building m11l Drupal and Joomla! sites 41
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Thank you!
18. October 2010 Building m11l Drupal and Joomla! sites 42
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Extra slides
18. October 2010 Building m11l Drupal and Joomla! sites 43
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.
Survey
What I liked best:
What I would improve:
How did presenters do?
(1 = poor, 4 = fair, 7 = great)
Overall session evaluation
(1 = poor, 4 = fair, 7 = great)
Email to: jdlh (at) jdlh.com
18. October 2010 Building m11l Drupal and Joomla! sites 45
Copyright 2010 Jim DeLaHunt. Licensed under CC-by-SA 3.0.