Multilingual Drupal presentation from "Do it With Drupal"

Gábor Hojtsy
Gábor HojtsyDrupal Core Developer at Acquia
Drupal world domination
   Translating interface and content in Drupal



       Gábor Hojtsy, Acquia Inc.
       December 12 2008, Do It With Drupal, New Orleans
        http://acquia.com/ • http://doitwithdrupal.com/
About the presenter
 Web developer since 1999,
 building open communities and
 contributing to open source
 projects ever since
 Works with and contributes to
 Drupal since 2003
 Drupal 6 branch maintainer
 Code gardener at Acquia
 http://acquia.com/
Will demo with Acquia Drupal
 Curated distribution of Drupal 6
 Connects to the Acquia Network
 Not a fork in any way of the
 included software, all GPL
 You can do everything shown
 with Drupal 6 and the modules
 mentioned in the session
About you
 Built non-Drupal
 multilanguage site?
 Built Drupal based site?
 Built Drupal based
 multilanguage site?

 “Decision makers”?
 “Users”?
 “Developers”?
Drupal 6 language
   subsystem
Two worlds, one family
 Text from inside module and theme code is
 translated for you
 –These can be pre-translated by international teams
 –Distributed and shared freely on drupal.org
 All custom content you generate is your job to
 translate
 –Content on the website, taxonomy, menus
 –Text in views, content type elds, and so on...
 Generally different ways to approach the two
And there is a lot more to do
 Relating translations (complete copies, subsites)
 Different permissions, lifecycles
 Setting up work ows
 Integrating with external tools
 Just selecting the language to use is complex
Drupal 6 language subsystem
The installer
Install in your language
 After pro le is selected, Drupal
 looks for available translations
 Offers translations to use
 Language packages can be
 downloaded and extracted into
 Drupal root for use
 Files in /pro les/pro lename/
 translations/ are considered
 Files are imported in a batch
 (progress bar)
Start screen of the default pro le
Some languages extracted to Drupal




                                In the le system.
On the installer interface.
Translated (almost)!
Translated (almost)!
Translated (almost)!
Translated (almost)!
Translated (almost)!
Imports translations automatically
The runtime knows
 about languages
Properties of languages known
 The default language for the website
 English and native language names
 Writing direction support (LTR or RTL)
 De ned ordering (weights)
 Path pre x or (sub)domain associated
 Administer » Site con guration » Languages
Adding new languages
 Extract interface translations to Drupal root
 Add language from prede ned list if possible
Automated translation import
 Modules and themes also have ./translations
 subdirectories
 When you add a language, all enabled modules and
 themes get translations imported
 When you enable a module or theme, translations
 imported in all languages
 Administer »
 Site building »
 Translate interface
The language to use to display the page
 Can be set to be always the site default
 Or pick the rst identi ed from this list:
 –IRI (domain name, path pre x)
 –User preferences
 –Browser language preference settings
 –Fallback on site default
 Which of these is used exactly is con gurable at
 Administer » Site con guration » Languages »
 Con gure
Example language setups
 Using path pre xes
 –German language set up with /deutsch path pre x
 –Hungarian language set up with /magyar path pre x
 Using subdomains
 –German language on de.example.com
 –Hungarian on hu.example.com
 Or even use high level domains
 –German on beispiel.de
 –Hungarian on példa.hu
Server setup for multiple domains
 Make sure that all domains point to the same
 virtual host in your webserver con guration
 Drupal should automatically pick up the domain
 from the request
 If using subdomains, make sure that cookies are set
 on *.example.com, not per subdomain
 If using standalone domains, you will not be signed
 on on multiple domains at once just by logging in
 at one of them
Language is known, now what?
 Drupal selects the language, but it is up to the rest
 of the modules used to act accordingly
 The interface is displayed in that language
 Website settings, views, etc. might need more
 tweaking to behave as you wish
 Getting “custom content” such as custom menu
 items, taxonomy terms and site settings to translate
 requires contributed modules
Right-to-left (sub)theme support




           Remember admin/settings/language to revert.
Right-to-left (sub)theme support
 Drupal itself includes RTL support for all its
 functionality
 All CSS le additions are intercepted and RTL
 cascade les are searched for (eg. style-rtl.css for
 style.css les)
 All core themes have RTL support
 Easy to write RTL supporting themes, even with
 color module
Language dependent path aliases
Language dependent e-mails
 Users have their preferred language set up
 Those registering on a translated page get that as
 preferred language by default
 This language is used to send e-mails, such as
 welcome or new password request e-mail
 Drupal 6 can send e-mails in multiple languages in
 one request
Language comes to
     content
Associate language to content
 As soon as locale module is enabled, content types
 can be language enabled
 Shows a language selection dropdown for posts
 when editing
 Allows for Language neutral posts. Applicable when
 content is not attached to any language
 Does not mean content translation in itself
 Use case: blogs, where author posts in different
 languages, but these are distinct posts on one site
Associate language to content
                        Setting up the
                        Page content type




       Creating new
       Page content
Consequences
 Post will have URL with language speci c part
 included (domain, path pre x), if set up
 The associated language can be used to create
 views, export in feeds, etc.
 Even if you only have a single language site, if
 translation ever becomes a requirement, better to
 have posts in the system already marked
Translate content
The content translation module
 Once the Content translation (core) module is
 enabled, a new language option is available
Translation functionality is exposed
Title and body pre lled for translation
                               Add Hungarian
                               translation for
                               Hebrew post.




        Translation links
        on each post.
Each translation is a different node
 Great, so that you can have different work ows for
 these nodes (eg. publish only if all translations are
 done)
 These can have different authors, updated times,
 permissions, comments in the given language, can
 show up in different feeds, and so on
 Sets of nodes belonging to the same set are called a
 translation set
 Voting, agging, etc. is supported on the set level as
 well in contributed modules
Basic work ow support in core
 The source node of the translation set can be set to
 be changed signi cantly, marking translations
 outdated
 The translations can then be updated to re ect the
 change
On the source post:
Basic work ow support in core




            On a translation. Uncheck if not true anymore.
So far so long for
Drupal 6 core itself
Review of the runtime architecture
Drupal 6 cannot translate
 Site settings
 Taxonomy (vocabularies, terms)
 User de ned menus (menus, items)
 Aggregator categories
 Pro le eld titles and categories
 Content type properties
 Blocks
 Node lists!
So look for contributed
  modules to add on
Interface translation
       tweaks
String overrides
 http://drupal.org/project/stringoverrides
 Replace text available for interface translation
 Less resource intensive then locale module
 Override in any language on Drupal 6
 Will only override the concrete strings speci ed
String overrides
Localization client
 http://drupal.org/project/l10n_client
 Drupal 6 allows collecting strings used on the page
 Tool built on top of that to translate strings while
 you walk around pages
 Can share translations to a central Localization
 server while you submit them
 Works on non-English pages, if people have
 permission to do it
Localization client
Localization server
 http://drupal.org/project/l10n_server
 Making interface translation for language groups a
 lot easier
 The intent is to move from CVS and drupal.org
 project management to a web application
 Translation sharing, support for packaging
 Can receive translations from Localization client
 Uses http://drupal.org/project/potx (Translation
 template extractor)
Web service based
content translation
Google translate
 http://drupal.org/project/gtrans
 Google operates an online translation service
 This module just passes text through that service
 via their normal web interface
 The output is wrapped, so users don’t see it going
 through Google
 Some caveats
 –Not legal, mentioned to highlight the concept
 –Does not work for logged-in users
 –Not well supported, no Drupal 6 version
Translatable comments
 http://drupal.org/project/translatablecomments
 Uses Google AJAX Translation API (legal)
 Completely JavaScript based
 Uses a xed set of languages
Original comment:



Translated to French:
Machine translation is hard (and funny)
Machine translation is hard (and funny)
Extended content
translation work ow
       support
Support computer aided humans
 Computer Aided Translation (CAT) tools take HTML,
 Word, etc. documents and allow translation of
 those
 They work with a translation memory which pre-
 translates the text
 Humans x the translations, and feed back the new
 knowledge to the memory (automatically)
 The translation gets to the originator in HTML, Word
 document, etc. format
XLIFF Tools module example
 http://drupal.org/project/xliff
 XML Localisation Interchange File Format is a
 format maintained by OASIS
 Separates content and formatting in a standard way
AWTW module
http://drupal.org/project/awtw
AWTW is Automated Web Translation Work ow
Works very similar to XLIFF Tools, but easier to use
Exports to a custom XML format, which includes
source node identi er
Allows you to import translations easily, since it can
 nd the original node based on the identi er
Not yet ported to Drupal 6
Translation overview
 http://drupal.org/project/translation_overview
 Works with the core translation system
 Modi es existing Translate tab on nodes
Translation overview screen
Team work ow with permissions
 http://drupal.org/project/work ow
 Actions and work ow modules allow you to set up
 work ows for translation with states and transitions
 Work ow access supports node level access control
 For example:
 –Only allow editing of a post until it is “sent for translation”
 –Send out email to translators then
 –Only allow translators to edit until set “for review”
 –Automatically publish when “reviewed”
What about content
      views?
Views
 http://drupal.org/project/views
 Views supports languages, translation sets and
 translation status values
 Easily lter on language or translation set for nodes
 Sort views by language
 Set up relations based on translation sets
 Language is only available if translation module
 enabled - see #343178 for more information
Views
Views
Translate more!
Internationalization (i18n) module
 Supports multilingual variables
 Language based listing with extended options for
 core content listing
Settings (variables) translation setup
                                         In your site’s
                                         settings.php
Site settings (variables) translation
                                        On your
                                        site’s user
                                        interface.
And submodules do a lot more
i18nstrings module
 Base (API) module for most custom translation tools
 Implements strings translation API via the Drupal 6
 core provided textgroups system
 Object based translation system which almost
 made it to Drupal 6
 Other modules like i18nblocks, i18nmenu and
 i18ntaxonomy use it
i18nblocks.module example
i18nblocks.module example
Share/sync data
between translations
i18nsync, i18npoll modules
 Helps you sync values between content translations
 Taxonomy terms, CCK elds are not shared among
 nodes in the same translation set
 i18nsync can sync taxonomy terms and CCK eld
 values between set members
 i18npoll module will help you aggregate poll
 results for translations
Other contributed modules
 The direction is to be able to attach behaviors to
 both individual nodes and translation sets
 Flag module for example supports agging by
 translation set or by individual node
 Coordinated work going on at the i18n group
 http://groups.drupal.org/node/15064
Look at your own
  requirements
Look at your own requirements
 People meet lots of different requirements
 You need to build your own solution according to
 that and adapt what is there to evolving needs
 There are a lot more multilingual options beyond
 what I could cover in this session, so keep exploring
 http://drupal.org/project/Modules/category/97
Questions?
Thanks
         Gábor Hojtsy
     gabor@acquia.com
Acquia Inc., http://acquia.com/
1 of 82

Recommended

Php intro by
Php introPhp intro
Php introsana mateen
972 views25 slides
PHP Basics by
PHP BasicsPHP Basics
PHP BasicsSasi Kumar
44 views13 slides
WEB PROGRAMMING UNIT V BY BHAVSINGH MALOTH by
WEB PROGRAMMING UNIT V BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT V BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT V BY BHAVSINGH MALOTHBhavsingh Maloth
2.3K views49 slides
PHP ITCS 323 by
PHP ITCS 323PHP ITCS 323
PHP ITCS 323Sleepy Head
6.5K views74 slides
Preparing an Open Source Documentation Repository for Translations by
Preparing an Open Source Documentation Repository for TranslationsPreparing an Open Source Documentation Repository for Translations
Preparing an Open Source Documentation Repository for TranslationsHPCC Systems
160 views54 slides
web Based Application Devlopment using PHP by
web Based Application Devlopment using PHPweb Based Application Devlopment using PHP
web Based Application Devlopment using PHPmaccodder
44 views21 slides

More Related Content

What's hot

Tech talk webtech by
Tech talk webtechTech talk webtech
Tech talk webtechShehrevar Davierwala
542 views21 slides
Apache Thrift : One Stop Solution for Cross Language Communication by
Apache Thrift : One Stop Solution for Cross Language CommunicationApache Thrift : One Stop Solution for Cross Language Communication
Apache Thrift : One Stop Solution for Cross Language CommunicationPiyush Goel
4.7K views20 slides
Tech talk php_cms by
Tech talk php_cmsTech talk php_cms
Tech talk php_cmsShehrevar Davierwala
512 views27 slides
Multilingual Drupal by
Multilingual DrupalMultilingual Drupal
Multilingual DrupalGábor Hojtsy
2.2K views39 slides
Php unit i by
Php unit iPhp unit i
Php unit iBagavathiLakshmi
48 views66 slides
All the language support in Drupal 8 - At Drupalaton 2014 by
All the language support in Drupal 8 - At Drupalaton 2014All the language support in Drupal 8 - At Drupalaton 2014
All the language support in Drupal 8 - At Drupalaton 2014Gábor Hojtsy
1.3K views99 slides

What's hot(18)

Apache Thrift : One Stop Solution for Cross Language Communication by Piyush Goel
Apache Thrift : One Stop Solution for Cross Language CommunicationApache Thrift : One Stop Solution for Cross Language Communication
Apache Thrift : One Stop Solution for Cross Language Communication
Piyush Goel4.7K views
All the language support in Drupal 8 - At Drupalaton 2014 by Gábor Hojtsy
All the language support in Drupal 8 - At Drupalaton 2014All the language support in Drupal 8 - At Drupalaton 2014
All the language support in Drupal 8 - At Drupalaton 2014
Gábor Hojtsy1.3K views
Web programming UNIT II by Bhavsingh Maloth by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh MalothWeb programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh Maloth
Bhavsingh Maloth789 views
Advanced PHP Web Development Tools in 2015 by iScripts
Advanced PHP Web Development Tools in 2015Advanced PHP Web Development Tools in 2015
Advanced PHP Web Development Tools in 2015
iScripts11.1K views
Multilingual websites with Mura CMS (MuraCon 2012) by Guust Nieuwenhuis
Multilingual websites with Mura CMS (MuraCon 2012)Multilingual websites with Mura CMS (MuraCon 2012)
Multilingual websites with Mura CMS (MuraCon 2012)
Guust Nieuwenhuis1.2K views
INTRUDUCTION TO HTML 5 by reshmy12
INTRUDUCTION TO HTML 5INTRUDUCTION TO HTML 5
INTRUDUCTION TO HTML 5
reshmy12242 views

Similar to Multilingual Drupal presentation from "Do it With Drupal"

Drupalcamp Atlanta 2010 Internationalization Presentation by
Drupalcamp Atlanta 2010 Internationalization PresentationDrupalcamp Atlanta 2010 Internationalization Presentation
Drupalcamp Atlanta 2010 Internationalization PresentationMediacurrent
649 views39 slides
Barcelona Multilanguage by
Barcelona MultilanguageBarcelona Multilanguage
Barcelona Multilanguageguest3a6661
995 views45 slides
Translating Drupal by
Translating DrupalTranslating Drupal
Translating Drupalguest3a6661
1.9K views41 slides
Introduction to domino_global_workbench_8.5 by
Introduction to domino_global_workbench_8.5Introduction to domino_global_workbench_8.5
Introduction to domino_global_workbench_8.5hepeiwei
2.8K views74 slides
Multilingual website in Drupal 8 by
Multilingual website in Drupal 8Multilingual website in Drupal 8
Multilingual website in Drupal 8valuebound
76 views12 slides
Multilingual WordPress by
Multilingual WordPressMultilingual WordPress
Multilingual WordPressMatt Smith
924 views76 slides

Similar to Multilingual Drupal presentation from "Do it With Drupal"(20)

Drupalcamp Atlanta 2010 Internationalization Presentation by Mediacurrent
Drupalcamp Atlanta 2010 Internationalization PresentationDrupalcamp Atlanta 2010 Internationalization Presentation
Drupalcamp Atlanta 2010 Internationalization Presentation
Mediacurrent649 views
Barcelona Multilanguage by guest3a6661
Barcelona MultilanguageBarcelona Multilanguage
Barcelona Multilanguage
guest3a6661995 views
Translating Drupal by guest3a6661
Translating DrupalTranslating Drupal
Translating Drupal
guest3a66611.9K views
Introduction to domino_global_workbench_8.5 by hepeiwei
Introduction to domino_global_workbench_8.5Introduction to domino_global_workbench_8.5
Introduction to domino_global_workbench_8.5
hepeiwei2.8K views
Multilingual website in Drupal 8 by valuebound
Multilingual website in Drupal 8Multilingual website in Drupal 8
Multilingual website in Drupal 8
valuebound76 views
Multilingual WordPress by Matt Smith
Multilingual WordPressMultilingual WordPress
Multilingual WordPress
Matt Smith924 views
International sites hreflang video slides by Dmitry Sergiets
International sites hreflang video slidesInternational sites hreflang video slides
International sites hreflang video slides
Dmitry Sergiets602 views
Multilingual WordPress (WordCamp Toronto 2014) by Matt Smith
Multilingual WordPress (WordCamp Toronto 2014)Multilingual WordPress (WordCamp Toronto 2014)
Multilingual WordPress (WordCamp Toronto 2014)
Matt Smith1.6K views
Multilingual Improvements for Drupal 8 by Acquia
Multilingual Improvements for Drupal 8Multilingual Improvements for Drupal 8
Multilingual Improvements for Drupal 8
Acquia3.6K views
[EclipseCon France 2017] Language Server Protocol in action by Mickael Istria
[EclipseCon France 2017] Language Server Protocol in action[EclipseCon France 2017] Language Server Protocol in action
[EclipseCon France 2017] Language Server Protocol in action
Mickael Istria936 views
Translation Markup Language and Universal Translation Memory by Michael Berkovich
Translation Markup Language and Universal Translation MemoryTranslation Markup Language and Universal Translation Memory
Translation Markup Language and Universal Translation Memory
Michael Berkovich674 views
A whole new world for multilingual sites in Drupal 8 - jam's Drupal Camp session by Jeffrey McGuire
A whole new world for multilingual sites in Drupal 8 - jam's Drupal Camp sessionA whole new world for multilingual sites in Drupal 8 - jam's Drupal Camp session
A whole new world for multilingual sites in Drupal 8 - jam's Drupal Camp session
Jeffrey McGuire4.5K views
The multilingual Drupal 8 experience (European Drupal Days 2015) by Eugenio Minardi
The multilingual Drupal 8 experience (European Drupal Days 2015)The multilingual Drupal 8 experience (European Drupal Days 2015)
The multilingual Drupal 8 experience (European Drupal Days 2015)
Eugenio Minardi447 views
Everything multilingual in Drupal 8 (2015 November) by Gábor Hojtsy
Everything multilingual in Drupal 8 (2015 November)Everything multilingual in Drupal 8 (2015 November)
Everything multilingual in Drupal 8 (2015 November)
Gábor Hojtsy1.6K views

More from Gábor Hojtsy

Open source project management at scale by
 Open source project management at scale Open source project management at scale
Open source project management at scaleGábor Hojtsy
134 views33 slides
Drupal 8.3.0: the features are ready, are you? by
Drupal 8.3.0: the features are ready, are you?Drupal 8.3.0: the features are ready, are you?
Drupal 8.3.0: the features are ready, are you?Gábor Hojtsy
439 views71 slides
Drupal 8 multilingual APIs by
Drupal 8 multilingual APIsDrupal 8 multilingual APIs
Drupal 8 multilingual APIsGábor Hojtsy
439 views75 slides
A Drupal 8 jövője és az oda vezető út by
A Drupal 8 jövője és az oda vezető útA Drupal 8 jövője és az oda vezető út
A Drupal 8 jövője és az oda vezető útGábor Hojtsy
542 views66 slides
Everything multilingual in Drupal 8 by
Everything multilingual in Drupal 8Everything multilingual in Drupal 8
Everything multilingual in Drupal 8Gábor Hojtsy
625 views73 slides
Drupal 8 Multilingual - what to look forward to by
Drupal 8 Multilingual - what to look forward toDrupal 8 Multilingual - what to look forward to
Drupal 8 Multilingual - what to look forward toGábor Hojtsy
2.3K views85 slides

More from Gábor Hojtsy(18)

Open source project management at scale by Gábor Hojtsy
 Open source project management at scale Open source project management at scale
Open source project management at scale
Gábor Hojtsy134 views
Drupal 8.3.0: the features are ready, are you? by Gábor Hojtsy
Drupal 8.3.0: the features are ready, are you?Drupal 8.3.0: the features are ready, are you?
Drupal 8.3.0: the features are ready, are you?
Gábor Hojtsy439 views
Drupal 8 multilingual APIs by Gábor Hojtsy
Drupal 8 multilingual APIsDrupal 8 multilingual APIs
Drupal 8 multilingual APIs
Gábor Hojtsy439 views
A Drupal 8 jövője és az oda vezető út by Gábor Hojtsy
A Drupal 8 jövője és az oda vezető útA Drupal 8 jövője és az oda vezető út
A Drupal 8 jövője és az oda vezető út
Gábor Hojtsy542 views
Everything multilingual in Drupal 8 by Gábor Hojtsy
Everything multilingual in Drupal 8Everything multilingual in Drupal 8
Everything multilingual in Drupal 8
Gábor Hojtsy625 views
Drupal 8 Multilingual - what to look forward to by Gábor Hojtsy
Drupal 8 Multilingual - what to look forward toDrupal 8 Multilingual - what to look forward to
Drupal 8 Multilingual - what to look forward to
Gábor Hojtsy2.3K views
Doing Drupal security right from Drupalcon London by Gábor Hojtsy
Doing Drupal security right from Drupalcon LondonDoing Drupal security right from Drupalcon London
Doing Drupal security right from Drupalcon London
Gábor Hojtsy2.4K views
Doing Drupal security right by Gábor Hojtsy
Doing Drupal security rightDoing Drupal security right
Doing Drupal security right
Gábor Hojtsy1.6K views
Drupal security - Configuration and process by Gábor Hojtsy
Drupal security - Configuration and processDrupal security - Configuration and process
Drupal security - Configuration and process
Gábor Hojtsy940 views
Backstage with Drupal localization - Part 1 by Gábor Hojtsy
Backstage with Drupal localization - Part 1Backstage with Drupal localization - Part 1
Backstage with Drupal localization - Part 1
Gábor Hojtsy1.1K views
Come for the software, stay for the community by Gábor Hojtsy
Come for the software, stay for the communityCome for the software, stay for the community
Come for the software, stay for the community
Gábor Hojtsy449 views
Come for the software, stay for the community - How Drupal improves and evolves by Gábor Hojtsy
Come for the software, stay for the community - How Drupal improves and evolvesCome for the software, stay for the community - How Drupal improves and evolves
Come for the software, stay for the community - How Drupal improves and evolves
Gábor Hojtsy862 views
Drupal Security from Drupalcamp Bratislava by Gábor Hojtsy
Drupal Security from Drupalcamp BratislavaDrupal Security from Drupalcamp Bratislava
Drupal Security from Drupalcamp Bratislava
Gábor Hojtsy1K views
Drupal Security from Drupalcamp Cologne 2009 by Gábor Hojtsy
Drupal Security from Drupalcamp Cologne 2009Drupal Security from Drupalcamp Cologne 2009
Drupal Security from Drupalcamp Cologne 2009
Gábor Hojtsy1.1K views
Here comes localize.drupal.org! by Gábor Hojtsy
Here comes localize.drupal.org!Here comes localize.drupal.org!
Here comes localize.drupal.org!
Gábor Hojtsy913 views
Translate Drupal from Drupalcamp Vienna by Gábor Hojtsy
Translate Drupal from Drupalcamp ViennaTranslate Drupal from Drupalcamp Vienna
Translate Drupal from Drupalcamp Vienna
Gábor Hojtsy1.1K views
Translate Drupal from Drupalcamp Prague by Gábor Hojtsy
Translate Drupal from Drupalcamp PragueTranslate Drupal from Drupalcamp Prague
Translate Drupal from Drupalcamp Prague
Gábor Hojtsy1.2K views
What's up with Drupal 7? by Gábor Hojtsy
What's up with Drupal 7?What's up with Drupal 7?
What's up with Drupal 7?
Gábor Hojtsy1.1K views

Recently uploaded

Pitch Deck Teardown: Scalestack's $1M AI sales tech Seed deck by
Pitch Deck Teardown: Scalestack's $1M AI sales tech Seed deckPitch Deck Teardown: Scalestack's $1M AI sales tech Seed deck
Pitch Deck Teardown: Scalestack's $1M AI sales tech Seed deckHajeJanKamps
29 views18 slides
Defcon Network.pdf by
Defcon Network.pdfDefcon Network.pdf
Defcon Network.pdfJesse Mauck
12 views4 slides
Tanishq by
Tanishq Tanishq
Tanishq supiriyakithuva
12 views7 slides
Leading in A Culture by
Leading in A CultureLeading in A Culture
Leading in A CultureSeta Wicaksana
11 views34 slides
India's Leading Cyber Security Companies to Watch.pdf by
India's Leading Cyber Security Companies to Watch.pdfIndia's Leading Cyber Security Companies to Watch.pdf
India's Leading Cyber Security Companies to Watch.pdfinsightssuccess2
7 views40 slides
UCA towards I5.0 OECD.pdf by
UCA towards I5.0 OECD.pdfUCA towards I5.0 OECD.pdf
UCA towards I5.0 OECD.pdfAPPAU_Ukraine
7 views16 slides

Recently uploaded(20)

Pitch Deck Teardown: Scalestack's $1M AI sales tech Seed deck by HajeJanKamps
Pitch Deck Teardown: Scalestack's $1M AI sales tech Seed deckPitch Deck Teardown: Scalestack's $1M AI sales tech Seed deck
Pitch Deck Teardown: Scalestack's $1M AI sales tech Seed deck
HajeJanKamps29 views
India's Leading Cyber Security Companies to Watch.pdf by insightssuccess2
India's Leading Cyber Security Companies to Watch.pdfIndia's Leading Cyber Security Companies to Watch.pdf
India's Leading Cyber Security Companies to Watch.pdf
voice logger software aegis.pdf by Nirmal Sharma
voice logger software aegis.pdfvoice logger software aegis.pdf
voice logger software aegis.pdf
Nirmal Sharma10 views
PMU Launch - Guaranteed Slides by pmulaunch
PMU Launch - Guaranteed SlidesPMU Launch - Guaranteed Slides
PMU Launch - Guaranteed Slides
pmulaunch11 views
Coomes Consulting Business Profile by Chris Coomes
Coomes Consulting Business ProfileCoomes Consulting Business Profile
Coomes Consulting Business Profile
Chris Coomes41 views
Top 10 IT Tasks Small Businesses Can Entrust to Offshore Professionals by altafhsayyednimetler
Top 10 IT Tasks Small Businesses Can Entrust to Offshore ProfessionalsTop 10 IT Tasks Small Businesses Can Entrust to Offshore Professionals
Top 10 IT Tasks Small Businesses Can Entrust to Offshore Professionals
Top 10 Web Development Companies in California by TopCSSGallery
Top 10 Web Development Companies in CaliforniaTop 10 Web Development Companies in California
Top 10 Web Development Companies in California
TopCSSGallery26 views
Why Networking Events Don't Work_ Why You Should Give Talks Instead by HarryRamsay1
Why Networking Events Don't Work_ Why You Should Give Talks Instead Why Networking Events Don't Work_ Why You Should Give Talks Instead
Why Networking Events Don't Work_ Why You Should Give Talks Instead
HarryRamsay17 views
See the new MTN tariffs effected November 28, 2023 by Kweku Zurek
See the new MTN tariffs effected November 28, 2023See the new MTN tariffs effected November 28, 2023
See the new MTN tariffs effected November 28, 2023
Kweku Zurek29.4K views
AIR FRESHENER SUPPLIERS IN MUSCAT OMAN by Hygienelinks2
AIR FRESHENER SUPPLIERS IN MUSCAT OMANAIR FRESHENER SUPPLIERS IN MUSCAT OMAN
AIR FRESHENER SUPPLIERS IN MUSCAT OMAN
Hygienelinks26 views
bookmyshow-1.pptx by 125071035
bookmyshow-1.pptxbookmyshow-1.pptx
bookmyshow-1.pptx
1250710358 views
Businesses to Start in 2024.pdf by Dante St James
Businesses to Start in 2024.pdfBusinesses to Start in 2024.pdf
Businesses to Start in 2024.pdf
Dante St James16 views
Bloomerang Thank Yous Dec 2023.pdf by Bloomerang
Bloomerang Thank Yous Dec 2023.pdfBloomerang Thank Yous Dec 2023.pdf
Bloomerang Thank Yous Dec 2023.pdf
Bloomerang71 views

Multilingual Drupal presentation from "Do it With Drupal"

  • 1. Drupal world domination Translating interface and content in Drupal Gábor Hojtsy, Acquia Inc. December 12 2008, Do It With Drupal, New Orleans http://acquia.com/ • http://doitwithdrupal.com/
  • 2. About the presenter Web developer since 1999, building open communities and contributing to open source projects ever since Works with and contributes to Drupal since 2003 Drupal 6 branch maintainer Code gardener at Acquia http://acquia.com/
  • 3. Will demo with Acquia Drupal Curated distribution of Drupal 6 Connects to the Acquia Network Not a fork in any way of the included software, all GPL You can do everything shown with Drupal 6 and the modules mentioned in the session
  • 4. About you Built non-Drupal multilanguage site? Built Drupal based site? Built Drupal based multilanguage site? “Decision makers”? “Users”? “Developers”?
  • 5. Drupal 6 language subsystem
  • 6. Two worlds, one family Text from inside module and theme code is translated for you –These can be pre-translated by international teams –Distributed and shared freely on drupal.org All custom content you generate is your job to translate –Content on the website, taxonomy, menus –Text in views, content type elds, and so on... Generally different ways to approach the two
  • 7. And there is a lot more to do Relating translations (complete copies, subsites) Different permissions, lifecycles Setting up work ows Integrating with external tools Just selecting the language to use is complex
  • 8. Drupal 6 language subsystem
  • 10. Install in your language After pro le is selected, Drupal looks for available translations Offers translations to use Language packages can be downloaded and extracted into Drupal root for use Files in /pro les/pro lename/ translations/ are considered Files are imported in a batch (progress bar)
  • 11. Start screen of the default pro le
  • 12. Some languages extracted to Drupal In the le system. On the installer interface.
  • 19. The runtime knows about languages
  • 20. Properties of languages known The default language for the website English and native language names Writing direction support (LTR or RTL) De ned ordering (weights) Path pre x or (sub)domain associated Administer » Site con guration » Languages
  • 21. Adding new languages Extract interface translations to Drupal root Add language from prede ned list if possible
  • 22. Automated translation import Modules and themes also have ./translations subdirectories When you add a language, all enabled modules and themes get translations imported When you enable a module or theme, translations imported in all languages Administer » Site building » Translate interface
  • 23. The language to use to display the page Can be set to be always the site default Or pick the rst identi ed from this list: –IRI (domain name, path pre x) –User preferences –Browser language preference settings –Fallback on site default Which of these is used exactly is con gurable at Administer » Site con guration » Languages » Con gure
  • 24. Example language setups Using path pre xes –German language set up with /deutsch path pre x –Hungarian language set up with /magyar path pre x Using subdomains –German language on de.example.com –Hungarian on hu.example.com Or even use high level domains –German on beispiel.de –Hungarian on példa.hu
  • 25. Server setup for multiple domains Make sure that all domains point to the same virtual host in your webserver con guration Drupal should automatically pick up the domain from the request If using subdomains, make sure that cookies are set on *.example.com, not per subdomain If using standalone domains, you will not be signed on on multiple domains at once just by logging in at one of them
  • 26. Language is known, now what? Drupal selects the language, but it is up to the rest of the modules used to act accordingly The interface is displayed in that language Website settings, views, etc. might need more tweaking to behave as you wish Getting “custom content” such as custom menu items, taxonomy terms and site settings to translate requires contributed modules
  • 27. Right-to-left (sub)theme support Remember admin/settings/language to revert.
  • 28. Right-to-left (sub)theme support Drupal itself includes RTL support for all its functionality All CSS le additions are intercepted and RTL cascade les are searched for (eg. style-rtl.css for style.css les) All core themes have RTL support Easy to write RTL supporting themes, even with color module
  • 30. Language dependent e-mails Users have their preferred language set up Those registering on a translated page get that as preferred language by default This language is used to send e-mails, such as welcome or new password request e-mail Drupal 6 can send e-mails in multiple languages in one request
  • 31. Language comes to content
  • 32. Associate language to content As soon as locale module is enabled, content types can be language enabled Shows a language selection dropdown for posts when editing Allows for Language neutral posts. Applicable when content is not attached to any language Does not mean content translation in itself Use case: blogs, where author posts in different languages, but these are distinct posts on one site
  • 33. Associate language to content Setting up the Page content type Creating new Page content
  • 34. Consequences Post will have URL with language speci c part included (domain, path pre x), if set up The associated language can be used to create views, export in feeds, etc. Even if you only have a single language site, if translation ever becomes a requirement, better to have posts in the system already marked
  • 36. The content translation module Once the Content translation (core) module is enabled, a new language option is available
  • 38. Title and body pre lled for translation Add Hungarian translation for Hebrew post. Translation links on each post.
  • 39. Each translation is a different node Great, so that you can have different work ows for these nodes (eg. publish only if all translations are done) These can have different authors, updated times, permissions, comments in the given language, can show up in different feeds, and so on Sets of nodes belonging to the same set are called a translation set Voting, agging, etc. is supported on the set level as well in contributed modules
  • 40. Basic work ow support in core The source node of the translation set can be set to be changed signi cantly, marking translations outdated The translations can then be updated to re ect the change On the source post:
  • 41. Basic work ow support in core On a translation. Uncheck if not true anymore.
  • 42. So far so long for Drupal 6 core itself
  • 43. Review of the runtime architecture
  • 44. Drupal 6 cannot translate Site settings Taxonomy (vocabularies, terms) User de ned menus (menus, items) Aggregator categories Pro le eld titles and categories Content type properties Blocks Node lists!
  • 45. So look for contributed modules to add on
  • 47. String overrides http://drupal.org/project/stringoverrides Replace text available for interface translation Less resource intensive then locale module Override in any language on Drupal 6 Will only override the concrete strings speci ed
  • 49. Localization client http://drupal.org/project/l10n_client Drupal 6 allows collecting strings used on the page Tool built on top of that to translate strings while you walk around pages Can share translations to a central Localization server while you submit them Works on non-English pages, if people have permission to do it
  • 51. Localization server http://drupal.org/project/l10n_server Making interface translation for language groups a lot easier The intent is to move from CVS and drupal.org project management to a web application Translation sharing, support for packaging Can receive translations from Localization client Uses http://drupal.org/project/potx (Translation template extractor)
  • 53. Google translate http://drupal.org/project/gtrans Google operates an online translation service This module just passes text through that service via their normal web interface The output is wrapped, so users don’t see it going through Google Some caveats –Not legal, mentioned to highlight the concept –Does not work for logged-in users –Not well supported, no Drupal 6 version
  • 54. Translatable comments http://drupal.org/project/translatablecomments Uses Google AJAX Translation API (legal) Completely JavaScript based Uses a xed set of languages Original comment: Translated to French:
  • 55. Machine translation is hard (and funny)
  • 56. Machine translation is hard (and funny)
  • 58. Support computer aided humans Computer Aided Translation (CAT) tools take HTML, Word, etc. documents and allow translation of those They work with a translation memory which pre- translates the text Humans x the translations, and feed back the new knowledge to the memory (automatically) The translation gets to the originator in HTML, Word document, etc. format
  • 59. XLIFF Tools module example http://drupal.org/project/xliff XML Localisation Interchange File Format is a format maintained by OASIS Separates content and formatting in a standard way
  • 60. AWTW module http://drupal.org/project/awtw AWTW is Automated Web Translation Work ow Works very similar to XLIFF Tools, but easier to use Exports to a custom XML format, which includes source node identi er Allows you to import translations easily, since it can nd the original node based on the identi er Not yet ported to Drupal 6
  • 61. Translation overview http://drupal.org/project/translation_overview Works with the core translation system Modi es existing Translate tab on nodes
  • 63. Team work ow with permissions http://drupal.org/project/work ow Actions and work ow modules allow you to set up work ows for translation with states and transitions Work ow access supports node level access control For example: –Only allow editing of a post until it is “sent for translation” –Send out email to translators then –Only allow translators to edit until set “for review” –Automatically publish when “reviewed”
  • 65. Views http://drupal.org/project/views Views supports languages, translation sets and translation status values Easily lter on language or translation set for nodes Sort views by language Set up relations based on translation sets Language is only available if translation module enabled - see #343178 for more information
  • 66. Views
  • 67. Views
  • 69. Internationalization (i18n) module Supports multilingual variables Language based listing with extended options for core content listing
  • 70. Settings (variables) translation setup In your site’s settings.php
  • 71. Site settings (variables) translation On your site’s user interface.
  • 72. And submodules do a lot more
  • 73. i18nstrings module Base (API) module for most custom translation tools Implements strings translation API via the Drupal 6 core provided textgroups system Object based translation system which almost made it to Drupal 6 Other modules like i18nblocks, i18nmenu and i18ntaxonomy use it
  • 77. i18nsync, i18npoll modules Helps you sync values between content translations Taxonomy terms, CCK elds are not shared among nodes in the same translation set i18nsync can sync taxonomy terms and CCK eld values between set members i18npoll module will help you aggregate poll results for translations
  • 78. Other contributed modules The direction is to be able to attach behaviors to both individual nodes and translation sets Flag module for example supports agging by translation set or by individual node Coordinated work going on at the i18n group http://groups.drupal.org/node/15064
  • 79. Look at your own requirements
  • 80. Look at your own requirements People meet lots of different requirements You need to build your own solution according to that and adapt what is there to evolving needs There are a lot more multilingual options beyond what I could cover in this session, so keep exploring http://drupal.org/project/Modules/category/97
  • 82. Thanks Gábor Hojtsy gabor@acquia.com Acquia Inc., http://acquia.com/