Your SlideShare is downloading. ×
Get ready for full translated sites with Entity Translation
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Get ready for full translated sites with Entity Translation

3,397
views

Published on

Do you build multilingual websites with D7 and Content Translation today? Wanna build them tomorrow with Drupal 8? This session is for you. …

Do you build multilingual websites with D7 and Content Translation today? Wanna build them tomorrow with Drupal 8? This session is for you.

Even Entity Translation already exists in Drupal 7 for quite a while, it's not widely used yet, mostly for Commerce Product translations as it is pretty handy there. If it comes into nodes, Content Translation ist still the prefered system for most sites.

In Drupal 8 there will be only one Translation System: Entity Translation. *oooh noo!*
BUT! There is one really good thing about Entity Translation: It can be already fully used with Drupal 7, so the change from D7 to D8 will be much easier.

Amazee Labs has already started to built Drupal 7 sites only with Entity Translation. It maybe sounds easy to translate a website only with Entity Translation, but there are quite some concepts which completely change. Like Menus, Entity References, Access Rights, Views, Fallbacks, and more.

In this session I want to talk about the biggest learnings we had, what is easy and what is hard to build with Entity Translation, give advice what works well and what not. To make the transition from Content Translation to Entity Translation as easy as possible for everybody.

For the full experience of the animated cat content gif goodness, you can download the Keynote slides at http://blog.amazeelabs.com/en/our-drupal-developer-days-szeged-slides.

Published in: Technology

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,397
On Slideshare
0
From Embeds
0
Number of Embeds
37
Actions
Shares
0
Downloads
8
Comments
0
Likes
2
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. Full site translations with Entity Translation Michael Schmid - @Schnitzel
  • 2. First trials with Entity Translation
  • 3. why Entity Translation? • Allows things not possible via Content Translation • Default in Drupal 8
  • 4. $body['und'][0]['value'] = "Body"; Can we use that?
  • 5. YES!
  • 6. Entity Translation! • uses Field Translations • 1 Node for all languages • changes concepts
  • 7. Entity TranslationContent Translation Node 1 Node 2 $language = "en"; $title = "Welcome"; $body['und'][0]['value'] = "Body"; $field_image['und'][0]['fi d'] = 45; $tnid = 1; $language = "de"; $title = "Willkommen"; $body['und'][0]['value'] = "Körper"; $field_image['und'][0]['fi d'] = 45; $tnid = 1; Node 1 $language = "en"; $title = "Welcome"; $body['en'][0]['value'] = "Body"; $body['de'][0]['value'] = "Körper"; $field_image['und'][0]['fid'] = 45;
  • 8. [#557292] Convert node title to fields
  • 9. [#571654] Revert node titles as fields [#557292] Convert node title to fields
  • 10. title module • https://drupal.org/project/title • allows to replace title with title_field • handles loading of right language
  • 11. using Entity Translation Content Translation Entity Translation
  • 12. what to make translatable?
  • 13. it depends!
  • 14. what to make translatable • Everything with Text • others...
  • 15. what languages are used for • actual translation • also different department informations • US vs Europe Products
  • 16. image fields? • if image contains text • or you need different images
  • 17. list fields? • to translate choices • i18n field translations • most probably not translatable
  • 18. file fields? • file probably contains text, so yes
  • 19. entity reference fields? • No, your referenced entity is translated again • Use entityreference field!
  • 20. Node 1 $body['en'][0]['value'] = "Body"; $body['de'][0]['value'] = "Körper"; $field_image['und'][0]['target_id'] = 98; entity reference fields Node 98 $body['en'][0]['value'] = "Hello"; $body['de'][0]['value'] = "Guten Tag";
  • 21. Node 1 $body['en'][0]['value'] = "Body"; $body['de'][0]['value'] = "Körper"; $field_image['en'][0]['target_id'] = 99; $field_image['de'][0]['target_id'] = 100; entity reference fields Node 99 $body['en'][0]['value'] = "Hello"; $body['de'][0]['value'] = "Guten Tag"; Node 100 $body['en'][0]['value'] = "My Name is"; $body['de'][0]['value'] = "Mein Name ist";
  • 22. taxonomy fields? • most probably not • translated again
  • 23. other entities?
  • 24. file entity translation • use file_entity module • title and alt texts are fields • make translatable • file itself not translatable
  • 25. taxonomy entity translation • can also be translated with i18n_taxonomy • don't do that anymore! • now with entity translation
  • 26. entity translation settings
  • 27. original
  • 28. translation
  • 29. what to translate?
  • 30. entity translation settings
  • 31. upgrade!
  • 32. Entity Translation Upgrade
  • 33. Entity Translation Upgrade • entity_translation_upgrade Module 1. make fields translatable! 2. replace title with title field 3. run upgrade 4. one Node will get field translations 5. other Nodes unpublished
  • 34. Issues
  • 35. Issues • Field Collections • [#7735819] • Views language filter • Revisions • Search API • search_api_et module
  • 36. Drupal 8 • no Content Translation like D7 anymore • Entity Translation is called Content Translation • every Entity is translated via Entity Translation
  • 37. conclusion
  • 38. conclusion • start to use it • think about what needs to be translatable • upgrades: test, test, test • you will still need i18n
  • 39. Entity Translation <3
  • 40. Demo