Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Multilingual Content: Presentation from DrupalCamp Montreal 2012


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Multilingual Content: Presentation from DrupalCamp Montreal 2012

  1. 1. Multilingual Content in Drupal 7 and 8
  2. 2. About MeCo-founder of Evolving WebTraining, Development,
  3. 3. Multilingual Drupal Training
  4. 4. Multilingual Content in Drupal 7 and 81. Getting Started• Multilingual Requirements 3. Content Translation Workflows• What is Multilingual Drupal? • Why it’s Important• Types of Drupal Text • Translation Management Tool2. Translating Content 4. What’s Next?• The Lifecycle of Drupal • Challenges in Drupal 7 Content Multilingual• Translation Methods • Learn More & Contribute• Planning Multilingual Content
  5. 5. MultilingualRequirements
  6. 6. Why Multilingual?• Reach a wider audience• Expand to new markets• Improve usability• Search engine optimization• Government regulations• Company policy
  7. 7. Multilingual ResourcesPersonnel Resources• User-Interface Translators • Contributed Translations (localize.drupal.og)• Content Translators • Machine Translation• QA for each Language• Translation Manager
  8. 8. Internationalization• aka i18n• Developing a website that enables localization of content and other elements.• Separating elements that should be localized so they can be specified for each locale.
  9. 9. Localization• aka l10n• Process of adapting a website for a certain locale including: • Translation of text and graphics • Numeric, date and time formats • Currency • Time zones • Legal requirements
  10. 10. What kind of site are you building?• How many languages do you need to support?• Does the user interface need to be fully translated?• Do you have content in all languages? Is all the content translated?• What happens to untranslated content?
  11. 11. What is MultilingualDrupal?
  12. 12. Foreign-language site
  13. 13. Multilingual Site
  14. 14. Multilingual Site with Translation
  15. 15. Multilingual Modules• Core: • Locale • Content Translation• Contrib: • i18n (Internationalization) • Entity Translation
  16. 16. Types of Text in Drupal
  17. 17. Types of Text Content User interface (Code) i18n Strings VariablesUser interface (User-Defined)
  18. 18. Built-in interface (Code)Translation Interfaces Built-in interface (User-Defined)in Drupal i18n Stringsi18n StringsVariables Content
  19. 19. Types of Text Content Built-in interface (Code) i18n Strings VariablesBuilt-in interface (User-Defined)
  20. 20. Multilingual Content
  21. 21. What contentexperience are youbuilding?
  22. 22. Fully Symmetric ExperienceEnglish Poilsh
  23. 23. Asymmetric ExperienceFrench English
  24. 24. What aboutuntranslated content?
  25. 25. Show Untranslated Content
  26. 26. Hide Untranslated ContentFrench English
  27. 27. Content TranslationMethods
  28. 28. Content Translation Methods Node-Level Translation Field-Level Translation Node 1 Node 2 Node 3 Node 1(English) (French) (German) Title Title Title Title Title Title(English) (French) (German) (English) (French) (German) Image Image Image Image
  29. 29. Node-Level Translation
  30. 30. Node-Level Translation• Content Translation module (Drupal core)• New node for each translation• Nodes are mapped together in a translation set
  31. 31. Translating Nodes Translation Set Node 1 Node 2 Node 3 (English) (French) (German) tnid = 1 tnid = 1 tnid = 1 Title Title Image Title Image Image(English) (French) (German)
  32. 32. Benefits of Node-Level Translation• Asymmetric menus per language• Language-specific features (flagging, sign-up, moderation)• Curation of content per language• Works for node-based functionality (i.e. search)• Use built-in ‘Flag as translation needs update’
  33. 33. Drawbacks of Node-Level Translation• Everything is language-specific by default• Need to ‘synchronize’ data between nodes• Too many nodes• Doesn’t work for modelling language-neutral things (groups of people, products, data)• Only works for nodes
  34. 34. Translating a Node
  35. 35. Language-Specific Properties
  36. 36. Properties per Translation Translation Set Node 1 Node 2 Node 3 (English) (French) (German) tnid = 1 tnid = 1 tnid = 1 Title Title Image Title Image Image(English) (French) (German) Menu Published Menu Published Menu PublishedSettings Date Settings Date Settings Date
  37. 37. Field-Level Translation
  38. 38. Field-Level Translation• Entity Translation module (contrib) provides the UI• Translation of fields instead of nodes• Fields are translatable in core
  39. 39. Translating Fields Node 1 Language-Specific Fields Language Independent Title Title Title Image Author(English) (French) (German) Body Body Body Facebook Post Date(English) (French) (German) Likes A single node, with translations of certain fields.
  40. 40. Language-Independent Properties• Flags • Entity references• Voting Data • Panels nodes’ layout• Signups • Content Access• Nodequeue or • Social Media Draggable Views Data Integration (Add This)• Moderation / Scheduler settings
  41. 41. Benefits of Field-Level Translation• Better model for language-neutral content: • No need to sync properties • 1 node ID• Works with all kinds of entities: • Taxonomy terms, users, etc.• It’s the future!
  42. 42. Drawbacks of Field-Level Translating• Doesn’t work with core search or revisions• Different UI for translators to learn• Not compatible with node options or multilingual select features from i18n• Doesn’t work with ‘Flag as needs translation update’• Properties can’t be translated
  43. 43. Setting up Field Translation for a Content Type
  44. 44. Setting up Field Translation
  45. 45. Translating the Title
  46. 46. Field Translation UI
  47. 47. Field Translation UI
  48. 48. Examples: Field vs.Node-Level Translation
  49. 49. Example: Conference Session
  50. 50. Example: Carousel Item
  51. 51. Example: Webform
  52. 52. Content Translation Methods Node-Level Translation Field-Level Translation Node 1 Node 2 Node 3 Node 1(English) (French) (German) Title Title Title Title Title Title(English) (French) (German) (English) (French) (German) Image Image Image Image
  53. 53. Life-cycle of a node Published Node Creation Node 1CSV User ‘Likes’ Node 1 x the Node Unpublished Node 1 Node 1 Node 1 Deleted Node 1 Node 1 + Comment Node 1 Flag as Offensive Update
  54. 54. Field vs. Node Translation: Conclusion• Field-level translation is the right data model for most use cases• Will be default method for D8 core• You can use it today on D7, but only if you’re not afraid to get your hands dirty
  55. 55. Translating Other EntityTypes
  56. 56. Translate Core Entities Translation of entities from core modules
  57. 57. Translate UsersConfigure Fields Translate Users Permissions
  58. 58. Translate Users: Use Cases• Team member profiles• Multilingual community site• Users who offer a service to users in more than one language
  59. 59. Translate Users: Drawbacks• Single permission for users (can translate any user entity)• UI is not self-explanatory
  60. 60. Translate TermsConfigure Fields Translate TermsPermissions
  61. 61. Translate Terms: Use Cases• Any vocabulary that is symmetric across languages: • Categories • Destinations • Medical Topics
  62. 62. Translate Terms: Drawbacks• Time-consuming to use translation UI• Single permission for translating all vocabularies• Alphabetical listings in Views will use source language
  63. 63. Translate CommentsConfigure Fields Translate CommentsPermissions
  64. 64. Translate Comments: Use Cases• Travel website (machine translation of reviews)• Government website (human translation of questions + answers)
  65. 65. Translate Other Entities Translation of entities from contributed modulesEntities need tohave fields andinclude translationsupport inhook_entity_info()
  66. 66. Commerce Product EntityLanguage-specific Language-neutral • Title • SKU • Description • Status • URL • Image • Price • Quantity Remaining • Shopping Cart Status
  67. 67. Commerce Product Entity
  68. 68. Commerce Product Entity
  69. 69. Commerce Product Entity
  70. 70. Content TranslationWorkflows
  71. 71. Cost of Translation• Time-consuming• Expensive• How can you speed up the process and reduce the amount of text to be translated?
  72. 72. Content Translation Workflow 1. Author creates a new node 2. Translator adds a translationAuthor Translator
  73. 73. Creating a Translation Workflow from Scratch• Permissions for translators• Rules and Flag to trigger translation requests• Views for Translators
  74. 74. Permissions for Translation• Node-Level Translation: Translators need to be able to create content• Field-Level Translation: Permission to edit the entity• No granular translation permissions per content type by default (use i18n_access)
  75. 75. Typical UI for Translators Permissions Rules Views
  76. 76. Challenges• Different UI for Entity Translation/Content Translation (Confusing)• Professional translators need to learn Drupal• Need to build system for reviewing translations
  77. 77. Translation Workflowsfor Content:TMGMT Module
  78. 78. Translation Management Tool (TMGMT)
  79. 79. Translation Management Tool (TMGMT)Drupal
  80. 80. Translators• Microsoft (Bing) Translator (machine)• Google Translate (machine)• Nativy (human)• MyGengo (human)• Supertext (human)• One Hour Translation (human)
  81. 81. Microsoft Translator
  82. 82. Microsoft Translator
  83. 83. Requesting Translations
  84. 84. Requesting Translations
  85. 85. Review Translation
  86. 86. Review Translation
  87. 87. Translate in Bulk
  88. 88. Benefits of TMGMT• Field-level and node-level translation• Also translate i18n strings (in development)• Easy to configure• Human/machine translator plugins• Write your own translator plugin
  89. 89. Challenges in Drupal 7• Choosing a content translation method• Permissions for Translators• Choosing contributed modules• Translating custom elements (Webforms)• Improve Translation UI• Building translation workflows in Drupal
  90. 90. Looking Forward to D8• Translatable properties• More things are entities• Better UI for adding/configuring languages• Come to Gábor’s Core Conversation tomorrow
  91. 91. Contrib Modules for Entity Translation• Entity Translation Feeds (et_feeds)• Search API Entity Translation (search_api_et)