Multilingual Content in Drupal 7 & 8 at DrupalCon Munich

  • 1,653 views
Uploaded on

 

More in: Business , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
No Downloads

Views

Total Views
1,653
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
28
Comments
1
Likes
3

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

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