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 in Drupal 7 & 8 at DrupalCon Munich

2,498 views

Published on

Published in: Business, Technology

Multilingual Content in Drupal 7 & 8 at DrupalCon Munich

  1. 1. Multilingual Content in Drupal 7 and 8 Suzanne Kennedy
  2. 2. Multilingual Content in Drupal 7 and 8
  3. 3. Multilingual Content in Drupal 7 and 8About MeCo-founder of Evolving WebTraining, Development, Consultingevolvingweb.ca@suzanne_kennedy
  4. 4. Multilingual Drupal Training evolvingweb.ca/training
  5. 5. Multilingual Content in Drupal 7 and 81. Getting Started 3. Content Translation Workflows• Multilingual Requirements • Why it’s Important• What is Multilingual Drupal? • Translation Management• Types of Drupal Text Modules2. Translating Content 4. What’s Next?• The Lifecycle of Drupal • Challenges in Drupal 7 Content Multilingual• Translation Methods • Learn More & Contribute• Planning Multilingual Content
  6. 6. MultilingualRequirements
  7. 7. Why Multilingual?• Reach a wider audience• Expand to new markets• Improve usability• Search engine optimization• Government regulations• Company policy
  8. 8. Multilingual ResourcesPersonnel Resources• User-Interface Translators • Contributed Translations (localize.drupal.og)• Content Translators • Machine Translation• QA for each Language• Translation Manager
  9. 9. 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.
  10. 10. 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
  11. 11. 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?
  12. 12. What is MultilingualDrupal?
  13. 13. Foreign-language site
  14. 14. Multilingual Site
  15. 15. Multilingual Site with Translation
  16. 16. Multilingual Modules• Core: • Locale • Content Translation• Contrib: • i18n (Internationalization) • Entity Translation
  17. 17. Types of Text in Drupal
  18. 18. Types of Text Content User interface (Code) i18n Strings VariablesUser interface (User-Defined)
  19. 19. Built-in interface (Code)Translation Interfaces Built-in interface (User-Defined)in Drupal i18n Stringsi18n StringsVariables Content
  20. 20. Types of Text Content Built-in interface (Code) i18n Strings VariablesBuilt-in interface (User-Defined)
  21. 21. Multilingual Content
  22. 22. What contentexperience are youbuilding?
  23. 23. Fully Symmetric ExperienceEnglish Poilsh
  24. 24. Asymmetric ExperienceFrench English
  25. 25. What aboutuntranslated content?
  26. 26. Show Untranslated Content
  27. 27. Hide Untranslated ContentFrench English
  28. 28. Content TranslationMethods
  29. 29. 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
  30. 30. Node-Level Translation
  31. 31. Node-Level Translation• Content Translation module (Drupal core)• New node for each translation• Nodes are mapped together in a translation set
  32. 32. 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)
  33. 33. 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’
  34. 34. 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
  35. 35. Translating a Node
  36. 36. Language-Specific Properties
  37. 37. 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
  38. 38. Field-Level Translation
  39. 39. Field-Level Translation• Entity Translation module (contrib) provides the UI• Translation of fields instead of nodes• Fields are translatable in core
  40. 40. 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.
  41. 41. 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
  42. 42. 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!
  43. 43. 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
  44. 44. Setting up Field Translation for a Content Type
  45. 45. Setting up Field Translation
  46. 46. Translating the Title drupal.org/project/title
  47. 47. Field Translation UI
  48. 48. Field Translation UI
  49. 49. Examples: Field vs.Node-Level Translation
  50. 50. Example: Conference Session
  51. 51. Example: Carousel Item
  52. 52. Example: Webform
  53. 53. 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
  54. 54. 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
  55. 55. 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
  56. 56. Translating Other EntityTypes
  57. 57. Translate Core Entities Translation of entities from core modules
  58. 58. Translate UsersConfigure Fields Translate Users Permissions
  59. 59. Translate Users: Use Cases• Team member profiles• Multilingual community site• Users who offer a service to users in more than one language
  60. 60. Translate Users: Drawbacks• Single permission for users (can translate any user entity)• UI is not self-explanatory
  61. 61. Translate TermsConfigure Fields Translate TermsPermissions
  62. 62. Translate Terms: Use Cases• Any vocabulary that is symmetric across languages: • Categories • Destinations • Medical Topics
  63. 63. Translate Terms: Drawbacks• Time-consuming to use translation UI• Single permission for translating all vocabularies• Alphabetical listings in Views will use source language
  64. 64. Translate CommentsConfigure Fields Translate CommentsPermissions
  65. 65. Translate Comments: Use Cases• Travel website (machine translation of reviews)• Government website (human translation of questions + answers)
  66. 66. Translate Other Entities Translation of entities from contributed modulesEntities need tohave fields andinclude translationsupport inhook_entity_info()
  67. 67. Commerce Product EntityLanguage-specific Language-neutral • Title • SKU • Description • Status • URL • Image • Price • Quantity Remaining • Shopping Cart Status
  68. 68. Commerce Product Entity
  69. 69. Commerce Product Entity
  70. 70. Commerce Product Entity
  71. 71. Content TranslationWorkflows
  72. 72. Cost of Translation• Time-consuming• Expensive• How can you speed up the process and reduce the amount of text to be translated?
  73. 73. Content Translation Workflow 1. Author creates a new node 2. Translator adds a translationAuthor Translator
  74. 74. Creating a Translation Workflow from Scratch• Permissions for translators• Rules and Flag to trigger translation requests• Views for Translators
  75. 75. 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)
  76. 76. Typical UI for Translators Permissions Rules Views
  77. 77. Challenges• Different UI for Entity Translation/Content Translation (Confusing)• Professional translators need to learn Drupal• Need to build system for reviewing translations
  78. 78. Translation Workflowsfor Content:TMGMT Module
  79. 79. Translation Management Tool (TMGMT) drupal.org/project/tmgmt
  80. 80. Translation Management Tool (TMGMT)Drupal
  81. 81. Translators• Microsoft (Bing) Translator (machine)• Google Translate (machine)• Nativy (human)• MyGengo (human)• Supertext (human)• One Hour Translation (human)
  82. 82. Microsoft Translator
  83. 83. Microsoft Translator
  84. 84. Requesting Translations
  85. 85. Requesting Translations
  86. 86. Review Translation
  87. 87. Review Translation
  88. 88. Translate in Bulk
  89. 89. 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
  90. 90. 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
  91. 91. Looking Forward to D8• Translatable properties• More things are entities• Better UI for adding/configuring languages• Come to Gábor’s Core Conversation tomorrow
  92. 92. Contrib Modules for Entity Translation• Entity Translation Feeds (et_feeds)• Search API Entity Translation (search_api_et)
  93. 93. Learn More & Contribute• Multilingual Q&A BoF (Wed 10:15)• Drupal 8’s Multilingual Wonderland (Wed 1pm)• Apache Solr Multilingual BoF (Today 5pm)• Localize.Drupal.org BoF (Thurs 10:45)• TMGMT BoF (Thurs at 1pm)• Code Sprint (Friday-Sunday)

×