Building Multilingual Sites in Drupal 7 by Yoni Steingiesser
Building Multilingual Sites with Drupal 7
description
Transcript of Building Multilingual Sites with Drupal 7
Building Multilingual Websiteswith Drupal 7
Wednesday, 11 January, 12
About Me
Suzanne Kennedy
Front-end Developer
Co-founder of Evolving Web in Montreal
evolvingweb.ca
@suzanne_kennedy
Wednesday, 11 January, 12
With Drupal, you can build:
• Foreign Language Site
• Multilingual Site
• Multilingual Site with Translation
Languages + Drupal
Wednesday, 11 January, 12
Foreign language site:
• Locale
Multilingual site
• Internationalization (i18n)
Multilingual site with translation:
• Content Translation (Nodes)
• Entity Translation (Fields)
Languages + Drupal
Wednesday, 11 January, 12
Questions before you start
• Is content symmetric across languages?
• How is untranslated content treated?
• Is language associated with location/region?
• How will the content/UI be translated?
• What is the default language of the site?
Wednesday, 11 January, 12
Symmetric Content
Wednesday, 11 January, 12
Asymmetric Content
Wednesday, 11 January, 12
Half-Symmetric Content
Wednesday, 11 January, 12
Untranslated Content
Wednesday, 11 January, 12
Does Language = Region
Wednesday, 11 January, 12
Translation Workflow
Wednesday, 11 January, 12
Types of Text to Translate
Wednesday, 11 January, 12
What Gets Translated?
Wednesday, 11 January, 12
Variables
Wednesday, 11 January, 12
Text from Modules
Wednesday, 11 January, 12
User-Entered Text Settings
Wednesday, 11 January, 12
Content: Nodes
Wednesday, 11 January, 12
Content: Entities
Wednesday, 11 January, 12
Text Groups
Wednesday, 11 January, 12
Setting up a Multilingual Website
Wednesday, 11 January, 12
Installing LanguagesConfiguration > Regional & language > Languages
Wednesday, 11 January, 12
Language Detection & SelectionConfiguration > Regional & language > Languages > Detection and Selection
Wednesday, 11 January, 12
Types of UI Text
• Variables
• Built-in UI (provided by modules)
• Built-in UI (provided by you)
Wednesday, 11 January, 12
Variables
Wednesday, 11 January, 12
Wednesday, 11 January, 12
Selecting VariablesConfiguration > Regional & language > Multilingual Settings > Variables
Wednesday, 11 January, 12
Translating Variables
Wednesday, 11 January, 12
Non-Text Variables
Wednesday, 11 January, 12
TranslatingText Strings from Code
Wednesday, 11 January, 12
Text Strings from Code
Wednesday, 11 January, 12
Text Strings from CodeConfiguration > Regional & language > Translation Interface > Translate
Wednesday, 11 January, 12
Text Strings from Code
Wednesday, 11 January, 12
Translating User-entered Strings
Wednesday, 11 January, 12
User-entered Strings
Wednesday, 11 January, 12
User-entered Strings
Wednesday, 11 January, 12
User-entered StringsConfiguration > Regional & language > Translation Interface > Translate
Wednesday, 11 January, 12
User-entered Strings
Wednesday, 11 January, 12
Translating Content
Wednesday, 11 January, 12
Translating Content
Wednesday, 11 January, 12
Translating Content
Wednesday, 11 January, 12
• New node for each translation
• Nodes are mapped together
• Uses the Content Translation module (core)
Node Translation
Wednesday, 11 January, 12
Translating a Node
Wednesday, 11 January, 12
Wednesday, 11 January, 12
Wednesday, 11 January, 12
Wednesday, 11 January, 12
• Translation of fields instead of nodes
• Entity Translation module (contrib) provides the UI
• Fields are translatable in core
Field-Level Translation
Wednesday, 11 January, 12
Example: Products
Wednesday, 11 January, 12
Example: Issues
Wednesday, 11 January, 12
Setting up Field Translation
Wednesday, 11 January, 12
Setting up Field Translation
Wednesday, 11 January, 12
Adding a Translation
Wednesday, 11 January, 12
Adding a Translation
Wednesday, 11 January, 12
Field Translation UI
Wednesday, 11 January, 12
Translating the Title
Wednesday, 11 January, 12
Translating the Title
Wednesday, 11 January, 12
Enabling Language Switcher
Wednesday, 11 January, 12
Comment Filtering
Wednesday, 11 January, 12
Comment Filtering
Wednesday, 11 January, 12
Translate Other Entities
Wednesday, 11 January, 12
Configure Entity Translation
Wednesday, 11 January, 12
Translate Users
Wednesday, 11 January, 12
Synchronize Translations
Wednesday, 11 January, 12
Views Translation Filters
Wednesday, 11 January, 12
Unfiltered View
Wednesday, 11 January, 12
Adding a Filter
Wednesday, 11 January, 12
Filtered Views
Wednesday, 11 January, 12
Translating Other Elements
Wednesday, 11 January, 12
• Blocks
• Field elements (i.e. help text, default values, options)
• Menu items
• Taxonomy terms
• Paths
Other Elements to Translate
Wednesday, 11 January, 12
Blocks
Wednesday, 11 January, 12
Block Translation
• Translate custom blocks
• Uses the Block Translation module in the i18n suite
• Allows you to target blocks for certain languages
Wednesday, 11 January, 12
Block Translation
Wednesday, 11 January, 12
Block Translation UI
Wednesday, 11 January, 12
Blocks Per Language
Wednesday, 11 January, 12
Field Translation(translating field settings)
Wednesday, 11 January, 12
Field Translation
• Translating field settings (label, help text, default text)
• Uses the Field Translation module in the i18n suite
• Only translates core field settings (not date fields, file fields, etc.)
Wednesday, 11 January, 12
Field Translation
Wednesday, 11 January, 12
Field Translation
Wednesday, 11 January, 12
Menu Items
Wednesday, 11 January, 12
Menu Translation
• Allows you to translate menu items OR target a menu at a single language
• Uses Menu Translation module in the i18n suite
Wednesday, 11 January, 12
Menu Translation
Menu Options:
• Fixed Language
• Translate and Localize
Menu items
• Linked to nodes
• Translate custom menu items
Wednesday, 11 January, 12
Menu Translation
Wednesday, 11 January, 12
Menu Translation
Wednesday, 11 January, 12
Taxonomy
Wednesday, 11 January, 12
Options per Vocabulary
Wednesday, 11 January, 12
Translating a Term
Wednesday, 11 January, 12
Other Multilingual Modules
Wednesday, 11 January, 12
Localization Update
Wednesday, 11 January, 12
Localization Client
Wednesday, 11 January, 12
Translation Overview
Wednesday, 11 January, 12
Challenges
• Choosing contributed modules
• Translating custom elements (Webforms)
• Multilingual audiences
• Improve Translation UI
• Out-sourced translation workflows
• Keeping track of UI strings to translate
Wednesday, 11 January, 12
What’s Next?
Wednesday, 11 January, 12
D8 Multilingual Initiative
Wednesday, 11 January, 12
Learn More
Wednesday, 11 January, 12
Learn Moreevolvingweb.ca/training
Wednesday, 11 January, 12
ResourcesDocumentation on drupal.orghttp://drupal.org/documentation/multilingual
My Blog Posts about D7 Multilingualhttp://evolvingweb.ca/story/drupal-7-multilingual-whats-new-i18nhttp://evolvingweb.ca/story/content-translation-drupal-7
Gabor Hojtsy's Posts about Multilingual D7http://hojtsy.hu/blog/2011-jan-19/drupal-7039s-new-multilingual-systems-part-1-basics
Presentation at DrupalCon Londonhttp://london2011.drupal.org/conference/sessions/multilingual-drupal-solutions-use-cases-and-modules
Drupal 8 Multilingual Initiative (with Video)http://drupal.org/node/1260534
Wednesday, 11 January, 12