going global: how to make your site multilingual

16
Going Global: How to Make Your Site Multilingual Dave Myburgh Senior Engineer Acquia Acquia Webinar: 23 July 2013

Upload: acquia

Post on 26-Jun-2015

1.024 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Going Global: How to Make Your Site Multilingual

Going Global: How to Make Your Site Multilingual

Dave Myburgh Senior Engineer Acquia

Acquia Webinar: 23 July 2013

Page 2: Going Global: How to Make Your Site Multilingual

About me •  incRn8 (user/51467) on Drupal.org

•  using Drupal since 4.6.5 (7+ years) - second site was multilingual

•  still have one 4.7 site live!

•  was a freelancer until I started at Acquia almost 2 years ago

•  contracted for Bonnier for a year and worked on popsci.com

•  jack-of-all-trades: originally a themer and site-builder

•  lead dev on acquia.com

•  take commands from marketing department, which keeps things

interesting ;)

Page 3: Going Global: How to Make Your Site Multilingual

About me

... and in case you were wondering about the

accent, I'm originally from South Africa

Page 4: Going Global: How to Make Your Site Multilingual

Multilingual Drupal 7

Node (content) translationone node per translation

vs

Entity translation one node for all translations

Page 5: Going Global: How to Make Your Site Multilingual

Multilingual Drupal 7

Node translation Entity translation Only works on nodes Works with any entity

One node per language One entity for ALL languages

Uses core node title "field" Requires Title module

Views language filtering works Required a patch to filter on entity language

XML Sitemap works XML Sitemap could not filter on entity language

Block translation is tricky Bean block module

Multiple menu items per language Single menu item per language

Page 6: Going Global: How to Make Your Site Multilingual

Multilingual Drupal 7

Drupal 8 will use entity translation.

Page 7: Going Global: How to Make Your Site Multilingual

Entity Translation requirements

•  Entity Translation http://drupal.org/project/entity_translation

•  Entity API http://drupal.org/project/entity

•  Title module http://drupal.org/project/title ...replacing node titles with fields

Recommended: •  Bean module http://drupal.org/project/bean

Block Entities Aren't Nodes

Page 8: Going Global: How to Make Your Site Multilingual

Multilingual Drupal 7

Demo

Page 9: Going Global: How to Make Your Site Multilingual

Language issues

•  menus didn't translate nicely - structure was different anyway

•  menublocks only show English menu titles

•  breadcrumbs often show English text

•  XML Sitemap shows English only

= switch to node translation

Page 10: Going Global: How to Make Your Site Multilingual

Node (content) translation

•  i18n module suite

•  want to switch all entity translations to nodes

•  change content type translation to regular translation

•  evaluated how to do it programmatically, but simpler to do it

manually (copy/paste)

•  used backup site with ET running to switch languages

•  redo url aliases to point to new nodes

•  update Views to use content translation language filter

Page 11: Going Global: How to Make Your Site Multilingual

Node (content) translation

•  All translatable node types use node translation

•  Menublocks in the footer work properly now

•  XMLSitemap shows correct language nodes

•  Breadcrumbs switch language correctly

So now we have:

Page 12: Going Global: How to Make Your Site Multilingual

Block translation

Still using Bean blocks

So we're running Entity translation module as well as

content translation.

Page 13: Going Global: How to Make Your Site Multilingual

Language switching

•  Multiple languages use less real estate in a drop-down

•  Language Switcher Dropdown http://drupal.org/project/lang_dropdown

•  disable javascript option

•  hard to theme, so browsers control much of the output

Page 14: Going Global: How to Make Your Site Multilingual

Q & A

•  Entity Translation http://drupal.org/project/entity_translation

•  Entity API http://drupal.org/project/entity

•  Title module http://drupal.org/project/title

•  Bean module http://drupal.org/project/bean

•  Localization update https://drupal.org/project/l10n_update

Modules used

Page 15: Going Global: How to Make Your Site Multilingual

Q & A

•  Views & Entity translation https://drupal.org/node/

1330332#comment-7360440

•  Gabor Hojtsy http://hojtsy.hu/multilingual-drupal7

Useful links

Page 16: Going Global: How to Make Your Site Multilingual

Thanks!