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

lessons learned from building a large multilingual multi
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Lessons Learned from Building a Large Multilingual, Multi-region Website in Drupal 8

Stella Power

Photo credit: mumsabroad.com

slide-2
SLIDE 2

A bit about me…

  • Drupal hobbyist
  • Founder of Annertech
  • Backend developer
  • https://www.drupal.org/u/stella
slide-3
SLIDE 3

Background

slide-4
SLIDE 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
slide-5
SLIDE 5

Getting setup

slide-6
SLIDE 6

Modules

Only need core modules

slide-7
SLIDE 7

Add your languages

slide-8
SLIDE 8

Add your languages

slide-9
SLIDE 9

Language Negotiation

slide-10
SLIDE 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
slide-11
SLIDE 11

Adding Translations

Photo credit: evandashevsky.com

slide-12
SLIDE 12

User interface translation

  • aka system strings
  • hasn’t changed much since Drupal 7
  • http://localize.drupal.org
slide-13
SLIDE 13

Content translation

  • “entity translation” in D7
slide-14
SLIDE 14

Enabling translation for your entity

slide-15
SLIDE 15

Nodes

slide-16
SLIDE 16

Taxonomy terms

slide-17
SLIDE 17

Menus

Image credit: ba-bamail.com

slide-18
SLIDE 18

Custom menu links

slide-19
SLIDE 19

Translating menu items

slide-20
SLIDE 20

Translating menu items (continued)

slide-21
SLIDE 21

a r a g r a p h s

slide-22
SLIDE 22

Translation - translate the paragraph entity, not the field Localisation - translate the paragraph field, not the entity

Paragraph id 1 Node 1 Paragraph id 1

Irish Irish

Node 1 Paragraph id 2

Irish Irish Irish Irish Irish English English English English

Paragraph id 1

slide-23
SLIDE 23

Translating configuration

slide-24
SLIDE 24

Example configuration page

slide-25
SLIDE 25

Configuration translation form

slide-26
SLIDE 26

Configuration schema

  • config/schema/example.schema.yml
  • Translatable types:
  • “text”
  • “label”
  • Other yml files:
  • mymodule.links.task.yml
  • mymodule.config_translation.yml
slide-27
SLIDE 27

Translating Views

slide-28
SLIDE 28

Localisation

Image credit: mobio.com

slide-29
SLIDE 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)
slide-30
SLIDE 30

Region taxonomy

slide-31
SLIDE 31
slide-32
SLIDE 32

Gotchas

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

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
slide-34
SLIDE 34

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
slide-35
SLIDE 35

Documentation

  • https://www.drupal.org/docs/8/multilingual
slide-36
SLIDE 36

JOIN US FOR CONTRIBUTION SPRINT

Friday, September 29, 2017

First time Sprinter Workshop Mentored Core Spint General sprint

9:00-12:00 Room: Lehgar 1 - Lehar 2 9:00-18:00 Room: Stolz 2 9:00-18:00 Room: Mall

#drupalsprints

slide-37
SLIDE 37

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

slide-38
SLIDE 38

Questions?

Fragen? Ceisteanna?

问题?

¿Preguntas? Вопросов?