lessons learned from building a large multilingual multi
play

Lessons Learned from Building a Large Multilingual, Multi-region - PowerPoint PPT Presentation

Lessons Learned from Building a Large Multilingual, Multi-region Website in Drupal 8 Stella Power Photo credit: mumsabroad.com A bit about me Drupal hobbyist Founder of Annertech Backend developer


  1. Lessons Learned from Building a Large Multilingual, Multi-region Website in Drupal 8 Stella Power Photo credit: mumsabroad.com

  2. A bit about me… • Drupal hobbyist • Founder of Annertech • Backend developer • https://www.drupal.org/u/stella

  3. Background

  4. Summary • Configuring your languages and language negotiation • Translation vs localisation • Translating nodes and taxonomy terms • The joys and pains of translating paragraphs • Translating menus and user interface strings

  5. Getting setup

  6. Modules Only need core modules

  7. Add your languages

  8. Add your languages

  9. Language Negotiation

  10. Translation vs Localisation • Translation • All content copy identical across languages - “like for like” translation • Commonly fallback to site default language if not translated • Localisation (aka regionalisation) • Content targeted to different markets / countries / regions • Content (and menus!) can diverge

  11. Adding Translations Photo credit: evandashevsky.com

  12. User interface translation • aka system strings • hasn’t changed much since Drupal 7 • http://localize.drupal.org

  13. Content translation • “entity translation” in D7

  14. Enabling translation for your entity

  15. Nodes

  16. Taxonomy terms

  17. Menus Image credit: ba-bamail.com

  18. Custom menu links

  19. Translating menu items

  20. Translating menu items (continued)

  21. a r a g r a p h s

  22. Translation - translate the paragraph entity, not the field Node 1 Paragraph id 1 English English Irish Irish Irish Localisation - translate the paragraph field, not the entity Node 1 Paragraph id 1 Paragraph id 1 English English Paragraph id 2 Irish Irish Irish Irish

  23. Translating configuration

  24. Example configuration page

  25. Configuration translation form

  26. Configuration schema • config/schema/example.schema.yml • Translatable types: • “text” • “label” • Other yml files: • mymodule.links.task.yml • mymodule.config_translation.yml

  27. Translating Views

  28. Localisation Image credit: mobio.com

  29. How we set up localisation • Multiple versions of each language (e.g. en-us, en-gb) • Region taxonomy (optional) • Allowed languages for the region • Countries in each region • IP Language Negotiation • Menus per region • Region switcher dropdown (custom module)

  30. Region taxonomy

  31. Gotchas • Performance & APCu limits for configuration cache • Paragraphs, translation vs localisation - decide first! • Google Translate • Caching & Redirects • SEO - xml sitemap, hreflang • Design

  32. Additional modules • Alternate hreflang - https://www.drupal.org/project/hreflang • Simple XML Sitemap - https://www.drupal.org/project/simple_sitemap • Language Switcher Dropdown - https://www.drupal.org/project/ lang_dropdown • IP Language Negotiation - https://www.drupal.org/project/ ip_language_negotiation • Translation Management Tool - https://www.drupal.org/project/tmgmt

  33. Patches • Drupal core • #2189267 - fix for content vs interface language negotiation • #2430335 - language negotiation, redirections and caching • Paragraphs • #2461695 - support for localisation • Entity Browser • #2721665 - support for translatable media entities

  34. Documentation • https://www.drupal.org/docs/8/multilingual

  35. JOIN US FOR CONTRIBUTION SPRINT Friday, September 29, 2017 Mentored First time General sprint Core Spint Sprinter Workshop 9:00-18:00 9:00-12:00 9:00-18:00 Room: Stolz 2 Room: Lehgar 1 - Lehar 2 Room: Mall #drupalsprints

  36. WHAT DID YOU THINK? Locate this session at the DrupalCon Vienna website: http://vienna2017.drupal.org/schedule Take the survey! https://www.surveymonkey.com/r/drupalconvienna

  37. 问题? Вопросов ? Fragen ? Ceisteanna ? Questions ? ¿Preguntas?

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend