SlideShare une entreprise Scribd logo
1  sur  42
Full site translations
with Entity Translation
Michael Schmid - @Schnitzel
First trials with Entity Translation
why Entity Translation?
• Allows things not possible via Content Translation
• Default in Drupal 8
$body['und'][0]['value'] = "Body";
Can we use that?
YES!
Entity Translation!
• uses Field Translations
• 1 Node for all languages
• changes concepts
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;
[#557292] Convert node title to fields
[#571654] Revert node titles as fields
[#557292] Convert node title to fields
title module
• https://drupal.org/project/title
• allows to replace title with title_field
• handles loading of right language
using Entity Translation
Content Translation
Entity Translation
what to make translatable?
it depends!
what to make translatable
• Everything with Text
• others...
what languages are used for
• actual translation
• also different department informations
• US vs Europe Products
image fields?
• if image contains text
• or you need different images
list fields?
• to translate choices
• i18n field translations
• most probably not translatable
file fields?
• file probably contains text, so yes
entity reference fields?
• No, your referenced entity is translated again
• Use entityreference field!
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";
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";
taxonomy fields?
• most probably not
• translated again
other entities?
file entity translation
• use file_entity module
• title and alt texts are fields
• make translatable
• file itself not translatable
taxonomy entity translation
• can also be translated with i18n_taxonomy
• don't do that anymore!
• now with entity translation
entity translation settings
original
translation
what to translate?
entity translation settings
upgrade!
Entity Translation Upgrade
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
Issues
Issues
• Field Collections
• [#7735819]
• Views language filter
• Revisions
• Search API
• search_api_et module
Drupal 8
• no Content Translation like D7 anymore
• Entity Translation is called Content Translation
• every Entity is translated via Entity Translation
conclusion
conclusion
• start to use it
• think about what needs to be translatable
• upgrades: test, test, test
• you will still need i18n
Entity Translation <3
Demo

Contenu connexe

Plus de Amazee Labs

Sonova.com building multilingual and multidomain drupal website
Sonova.com building multilingual and multidomain drupal websiteSonova.com building multilingual and multidomain drupal website
Sonova.com building multilingual and multidomain drupal websiteAmazee Labs
 
WebExpresso - Switch the Switch
WebExpresso - Switch the SwitchWebExpresso - Switch the Switch
WebExpresso - Switch the SwitchAmazee Labs
 
My Job Is Harder Than Yours (D4D Boston 2014)
My Job Is Harder Than Yours (D4D Boston 2014)My Job Is Harder Than Yours (D4D Boston 2014)
My Job Is Harder Than Yours (D4D Boston 2014)Amazee Labs
 
Strategy Session (DrupalCamp CO)
Strategy Session (DrupalCamp CO)Strategy Session (DrupalCamp CO)
Strategy Session (DrupalCamp CO)Amazee Labs
 
Amazee web expresso 2 2014
Amazee web expresso 2 2014Amazee web expresso 2 2014
Amazee web expresso 2 2014Amazee Labs
 
Web express-drupal-8
Web express-drupal-8Web express-drupal-8
Web express-drupal-8Amazee Labs
 
Logging with Elasticsearch, Logstash & Kibana
Logging with Elasticsearch, Logstash & KibanaLogging with Elasticsearch, Logstash & Kibana
Logging with Elasticsearch, Logstash & KibanaAmazee Labs
 
Manage and Deploy your sites with Drush
Manage and Deploy your sites with DrushManage and Deploy your sites with Drush
Manage and Deploy your sites with DrushAmazee Labs
 
Overwriting code in Drupal
Overwriting code in DrupalOverwriting code in Drupal
Overwriting code in DrupalAmazee Labs
 
Web Expresso: Drupal 8 - What's new
Web Expresso: Drupal 8 - What's newWeb Expresso: Drupal 8 - What's new
Web Expresso: Drupal 8 - What's newAmazee Labs
 
There are no bad clients, just bad project managers
There are no bad clients, just bad project managersThere are no bad clients, just bad project managers
There are no bad clients, just bad project managersAmazee Labs
 
Translation Management
Translation ManagementTranslation Management
Translation ManagementAmazee Labs
 
Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012Amazee Labs
 
Drupal für Entwickler
Drupal für EntwicklerDrupal für Entwickler
Drupal für EntwicklerAmazee Labs
 
Responsive Web Design - Ein Überblick
Responsive Web Design - Ein ÜberblickResponsive Web Design - Ein Überblick
Responsive Web Design - Ein ÜberblickAmazee Labs
 
Social Media & Community MGMT (for Startups)
Social Media & Community MGMT (for Startups)Social Media & Community MGMT (for Startups)
Social Media & Community MGMT (for Startups)Amazee Labs
 
PHP High Availability High Performance
PHP High Availability High PerformancePHP High Availability High Performance
PHP High Availability High PerformanceAmazee Labs
 
Drupal High Availability and High Performance
Drupal High Availability and High PerformanceDrupal High Availability and High Performance
Drupal High Availability and High PerformanceAmazee Labs
 
Drupal & Wordpress
Drupal & WordpressDrupal & Wordpress
Drupal & WordpressAmazee Labs
 
Drupal 7 Einblick und Ausblick
Drupal 7 Einblick und AusblickDrupal 7 Einblick und Ausblick
Drupal 7 Einblick und AusblickAmazee Labs
 

Plus de Amazee Labs (20)

Sonova.com building multilingual and multidomain drupal website
Sonova.com building multilingual and multidomain drupal websiteSonova.com building multilingual and multidomain drupal website
Sonova.com building multilingual and multidomain drupal website
 
WebExpresso - Switch the Switch
WebExpresso - Switch the SwitchWebExpresso - Switch the Switch
WebExpresso - Switch the Switch
 
My Job Is Harder Than Yours (D4D Boston 2014)
My Job Is Harder Than Yours (D4D Boston 2014)My Job Is Harder Than Yours (D4D Boston 2014)
My Job Is Harder Than Yours (D4D Boston 2014)
 
Strategy Session (DrupalCamp CO)
Strategy Session (DrupalCamp CO)Strategy Session (DrupalCamp CO)
Strategy Session (DrupalCamp CO)
 
Amazee web expresso 2 2014
Amazee web expresso 2 2014Amazee web expresso 2 2014
Amazee web expresso 2 2014
 
Web express-drupal-8
Web express-drupal-8Web express-drupal-8
Web express-drupal-8
 
Logging with Elasticsearch, Logstash & Kibana
Logging with Elasticsearch, Logstash & KibanaLogging with Elasticsearch, Logstash & Kibana
Logging with Elasticsearch, Logstash & Kibana
 
Manage and Deploy your sites with Drush
Manage and Deploy your sites with DrushManage and Deploy your sites with Drush
Manage and Deploy your sites with Drush
 
Overwriting code in Drupal
Overwriting code in DrupalOverwriting code in Drupal
Overwriting code in Drupal
 
Web Expresso: Drupal 8 - What's new
Web Expresso: Drupal 8 - What's newWeb Expresso: Drupal 8 - What's new
Web Expresso: Drupal 8 - What's new
 
There are no bad clients, just bad project managers
There are no bad clients, just bad project managersThere are no bad clients, just bad project managers
There are no bad clients, just bad project managers
 
Translation Management
Translation ManagementTranslation Management
Translation Management
 
Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012Drupal High Availability High Performance 2012
Drupal High Availability High Performance 2012
 
Drupal für Entwickler
Drupal für EntwicklerDrupal für Entwickler
Drupal für Entwickler
 
Responsive Web Design - Ein Überblick
Responsive Web Design - Ein ÜberblickResponsive Web Design - Ein Überblick
Responsive Web Design - Ein Überblick
 
Social Media & Community MGMT (for Startups)
Social Media & Community MGMT (for Startups)Social Media & Community MGMT (for Startups)
Social Media & Community MGMT (for Startups)
 
PHP High Availability High Performance
PHP High Availability High PerformancePHP High Availability High Performance
PHP High Availability High Performance
 
Drupal High Availability and High Performance
Drupal High Availability and High PerformanceDrupal High Availability and High Performance
Drupal High Availability and High Performance
 
Drupal & Wordpress
Drupal & WordpressDrupal & Wordpress
Drupal & Wordpress
 
Drupal 7 Einblick und Ausblick
Drupal 7 Einblick und AusblickDrupal 7 Einblick und Ausblick
Drupal 7 Einblick und Ausblick
 

Dernier

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Dernier (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Get ready for full translated sites with Entity Translation