SlideShare a Scribd company logo
November 6, 2020
By: Erik Stielstra
Managing Interface Translations
Erik Stielstra
Sr Drupal Developer & Mentor
Contrib and Drupal 8 core development
Created the D8 interface translation
@Sutharsan
Managing Interface Translations
• Basic principles
• The 3 types of translatable strings
• Questions & Answers
Article
https://medium.com/limoengroen/how-to-deploy-drupal-interface-t
ranslations-5653294c4af6
Basic principles
• Developer centric workflow
• We prefer editing files over GUI
• All translation files (.po) are stored in git *
• All UI strings in custom code and theme are translatable.
3 sources of translatable strings
• Strings in core and contrib modules
• Strings in custom modules and theme
• Custom translations that override the others
1. Translate core and contrib strings
Translate core and contrib strings
Enable
module
Download
gettext
Save file
Import
translations
Add file
to Git
Interface Translation module
Translate core and contrib strings
Developer
• Download and import module translations (drush 9+):
drush pm:enable extra_field
• Add translations to Git:
git add ../translations
Translate core and contrib strings
Stage
• Import translations from file:
drush locale:check
drush locale:update
Translate core and contrib strings
Interface Translation settings
• Never check for updates
• Only use local translation source
• Only overwrite imported translations
• Translations directory outside of drupal root:
../translations
Development config override
• Use local _and remote_ translation source
$config['locale.settings']['translation']['use_source']
= 'remote_and_local';
2. Translate custom code and theme strings
Translate custom code and theme strings
Custom code
Export with
potx module
Import
translations
Add file
to Git
Make
po file
Translate custom code and theme strings
Developer
• Create translation file (manually or with potx):
example/translations/example.nl.po
• Import translation to verify:
drush locale:check
drush locale:update
• Add translations to Git:
git add modules/custom/example/translations
Translate custom code and theme strings
Files
• Added to example.info.yml
interface translation project: example
interface translation server pattern:
modules/custom/%project/translations/%project.%language.po
• Translation file
modules/custom/example/translations/example.nl.po
Translate custom code and theme strings
Stage
• Import translations from file
drush locale:check
drush locale:update
3. Translations that override the others
Translations that override the others
Export with
potx module
Import
translations
Add file
to Git
Make
po file
Translations that override the others
Developer
• Create translation file:
../translations/custom-translations.{langcode}.po
• Import translation to verify: drush locale (drush 9.5+):
drush locale:import nl
../translations/custom-translations.nl.po
--type=customized --override=all
• Add translations to Git:
git add translations/custom-translations.*
Translations that override the others
Stage
Import custom translations from file to override other
translations (drush 9.5+):
drush locale:import nl
../translations/custom-translations.nl.po
--type=customized --override=all
Questions
If you don't want to store translations in git
• Use https://github.com/drupal-composer/drupal-l10n
• Use local source in dev (do not override in settings.php)
How to deploy Drupal interface translations
https://medium.com/limoengroen/how-to-deploy-dr
upal-interface-translations-5653294c4af6
Image attributions
• DrupalJam 2008 by Bert Boerland; CC by-nc-sa 2.0
• DrupalJam 2010 by Boris Doesborg; CC by-nc-sa 2.0
• DrupalJam 2011 by Gerard Mourits; CC by 2.0
• DrupalJam 2014 by Daniël Smidt; CC by-nc-sa 2.0
Managing Interface Translations
Slides online:
https://www.slideshare.net/LimoenGroen/managing-drupal-interface-translation
License:
https://creativecommons.org/licenses/by-nc-sa/2.0/

More Related Content

What's hot

C#: Past, Present and Future
C#: Past, Present and FutureC#: Past, Present and Future
C#: Past, Present and Future
Rodolfo Finochietti
 
Whats new in .net for 2019
Whats new in .net for 2019Whats new in .net for 2019
Whats new in .net for 2019
Rory Preddy
 
.NET Standard - Under the Hood
.NET Standard - Under the Hood.NET Standard - Under the Hood
.NET Standard - Under the Hood
Immo Landwerth
 
Evalution about programming language part 1
Evalution about programming language part 1Evalution about programming language part 1
Evalution about programming language part 1
Synapseindiappsdevelopment
 
.NET Standard - NuGet Analysis
.NET Standard - NuGet Analysis.NET Standard - NuGet Analysis
.NET Standard - NuGet Analysis
Immo Landwerth
 
WordPress 4.1
WordPress 4.1WordPress 4.1
WordPress 4.1
Konstantin Obenland
 
Language Engineering in the Cloud
Language Engineering in the CloudLanguage Engineering in the Cloud
Language Engineering in the Cloud
lennartkats
 

What's hot (7)

C#: Past, Present and Future
C#: Past, Present and FutureC#: Past, Present and Future
C#: Past, Present and Future
 
Whats new in .net for 2019
Whats new in .net for 2019Whats new in .net for 2019
Whats new in .net for 2019
 
.NET Standard - Under the Hood
.NET Standard - Under the Hood.NET Standard - Under the Hood
.NET Standard - Under the Hood
 
Evalution about programming language part 1
Evalution about programming language part 1Evalution about programming language part 1
Evalution about programming language part 1
 
.NET Standard - NuGet Analysis
.NET Standard - NuGet Analysis.NET Standard - NuGet Analysis
.NET Standard - NuGet Analysis
 
WordPress 4.1
WordPress 4.1WordPress 4.1
WordPress 4.1
 
Language Engineering in the Cloud
Language Engineering in the CloudLanguage Engineering in the Cloud
Language Engineering in the Cloud
 

Similar to Managing Drupal interface translation

Do + ldo for developers(full)
Do + ldo for developers(full)Do + ldo for developers(full)
Do + ldo for developers(full)
Andrii Podanenko
 
IS - section 1 - modifiedFinal information system.pptx
IS - section 1 - modifiedFinal information system.pptxIS - section 1 - modifiedFinal information system.pptx
IS - section 1 - modifiedFinal information system.pptx
NaglaaAbdelhady
 
Writing Services with ZF2
Writing Services with ZF2Writing Services with ZF2
Writing Services with ZF2
Mike Willbanks
 
Python Tutorial Part 2
Python Tutorial Part 2Python Tutorial Part 2
Python Tutorial Part 2
Haitham El-Ghareeb
 
Sanjip Shah: Internationalizing and Localizing WordPress Themes
Sanjip Shah: Internationalizing and Localizing  WordPress ThemesSanjip Shah: Internationalizing and Localizing  WordPress Themes
Sanjip Shah: Internationalizing and Localizing WordPress Themes
wpnepal
 
August OpenNTF Webinar - Git and GitHub Explained
August OpenNTF Webinar - Git and GitHub ExplainedAugust OpenNTF Webinar - Git and GitHub Explained
August OpenNTF Webinar - Git and GitHub Explained
Howard Greenberg
 
Internationalizing and localizing wordpress theme
Internationalizing and localizing  wordpress themeInternationalizing and localizing  wordpress theme
Internationalizing and localizing wordpress theme
Sanjip Shah
 
Composer JSON kills make files
Composer JSON kills make filesComposer JSON kills make files
Composer JSON kills make files
ropsu
 
2013 t-dose - libre office easyhacks
2013   t-dose - libre office easyhacks2013   t-dose - libre office easyhacks
2013 t-dose - libre office easyhacks
Rob Snelders
 
How to reduce DTP and translation costs with FrameMaker
How to reduce DTP and translation costs with FrameMakerHow to reduce DTP and translation costs with FrameMaker
How to reduce DTP and translation costs with FrameMaker
Globalization Partners International
 
DITA Quick Start Webinar Series: Getting Started with the DITA Open Toolkit
DITA Quick Start Webinar Series: Getting Started with the DITA Open ToolkitDITA Quick Start Webinar Series: Getting Started with the DITA Open Toolkit
DITA Quick Start Webinar Series: Getting Started with the DITA Open Toolkit
Suite Solutions
 
Using Grunt with Drupal
Using Grunt with DrupalUsing Grunt with Drupal
Using Grunt with Drupal
arithmetric
 
O'Leary - Using GitHub for Enterprise and Open Source Documentation
O'Leary - Using GitHub for Enterprise and Open Source DocumentationO'Leary - Using GitHub for Enterprise and Open Source Documentation
O'Leary - Using GitHub for Enterprise and Open Source Documentation
LavaCon
 
Using a Private Git Server for Packaging Software
Using a Private Git Server for Packaging SoftwareUsing a Private Git Server for Packaging Software
Using a Private Git Server for Packaging Software
Chris Jean
 
Drupal Best Practices
Drupal Best PracticesDrupal Best Practices
Drupal Best Practices
Mukesh Agarwal
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
atishgoswami
 
Integrating DTDs into DITA CMS
Integrating DTDs into DITA CMSIntegrating DTDs into DITA CMS
Integrating DTDs into DITA CMS
IXIASOFT
 
FrameMaker and the DITA Open Toolkit
FrameMaker and the DITA Open ToolkitFrameMaker and the DITA Open Toolkit
FrameMaker and the DITA Open Toolkit
Contrext Solutions
 
Building gRPC services
Building gRPC servicesBuilding gRPC services
Building gRPC services
Robert Robinson
 
Managing changes to eZPublish Database
Managing changes to eZPublish DatabaseManaging changes to eZPublish Database
Managing changes to eZPublish Database
Gaetano Giunta
 

Similar to Managing Drupal interface translation (20)

Do + ldo for developers(full)
Do + ldo for developers(full)Do + ldo for developers(full)
Do + ldo for developers(full)
 
IS - section 1 - modifiedFinal information system.pptx
IS - section 1 - modifiedFinal information system.pptxIS - section 1 - modifiedFinal information system.pptx
IS - section 1 - modifiedFinal information system.pptx
 
Writing Services with ZF2
Writing Services with ZF2Writing Services with ZF2
Writing Services with ZF2
 
Python Tutorial Part 2
Python Tutorial Part 2Python Tutorial Part 2
Python Tutorial Part 2
 
Sanjip Shah: Internationalizing and Localizing WordPress Themes
Sanjip Shah: Internationalizing and Localizing  WordPress ThemesSanjip Shah: Internationalizing and Localizing  WordPress Themes
Sanjip Shah: Internationalizing and Localizing WordPress Themes
 
August OpenNTF Webinar - Git and GitHub Explained
August OpenNTF Webinar - Git and GitHub ExplainedAugust OpenNTF Webinar - Git and GitHub Explained
August OpenNTF Webinar - Git and GitHub Explained
 
Internationalizing and localizing wordpress theme
Internationalizing and localizing  wordpress themeInternationalizing and localizing  wordpress theme
Internationalizing and localizing wordpress theme
 
Composer JSON kills make files
Composer JSON kills make filesComposer JSON kills make files
Composer JSON kills make files
 
2013 t-dose - libre office easyhacks
2013   t-dose - libre office easyhacks2013   t-dose - libre office easyhacks
2013 t-dose - libre office easyhacks
 
How to reduce DTP and translation costs with FrameMaker
How to reduce DTP and translation costs with FrameMakerHow to reduce DTP and translation costs with FrameMaker
How to reduce DTP and translation costs with FrameMaker
 
DITA Quick Start Webinar Series: Getting Started with the DITA Open Toolkit
DITA Quick Start Webinar Series: Getting Started with the DITA Open ToolkitDITA Quick Start Webinar Series: Getting Started with the DITA Open Toolkit
DITA Quick Start Webinar Series: Getting Started with the DITA Open Toolkit
 
Using Grunt with Drupal
Using Grunt with DrupalUsing Grunt with Drupal
Using Grunt with Drupal
 
O'Leary - Using GitHub for Enterprise and Open Source Documentation
O'Leary - Using GitHub for Enterprise and Open Source DocumentationO'Leary - Using GitHub for Enterprise and Open Source Documentation
O'Leary - Using GitHub for Enterprise and Open Source Documentation
 
Using a Private Git Server for Packaging Software
Using a Private Git Server for Packaging SoftwareUsing a Private Git Server for Packaging Software
Using a Private Git Server for Packaging Software
 
Drupal Best Practices
Drupal Best PracticesDrupal Best Practices
Drupal Best Practices
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Integrating DTDs into DITA CMS
Integrating DTDs into DITA CMSIntegrating DTDs into DITA CMS
Integrating DTDs into DITA CMS
 
FrameMaker and the DITA Open Toolkit
FrameMaker and the DITA Open ToolkitFrameMaker and the DITA Open Toolkit
FrameMaker and the DITA Open Toolkit
 
Building gRPC services
Building gRPC servicesBuilding gRPC services
Building gRPC services
 
Managing changes to eZPublish Database
Managing changes to eZPublish DatabaseManaging changes to eZPublish Database
Managing changes to eZPublish Database
 

More from LimoenGroen

Drupal Quick wins for an accessible website
Drupal Quick wins for an accessible websiteDrupal Quick wins for an accessible website
Drupal Quick wins for an accessible website
LimoenGroen
 
Open drupal DrupalCamp Gent 2018
Open drupal DrupalCamp Gent 2018Open drupal DrupalCamp Gent 2018
Open drupal DrupalCamp Gent 2018
LimoenGroen
 
24Kitchen, the no. 1 platform for food lovers (Showcase LimoenGroen)
24Kitchen, the no. 1 platform for food lovers (Showcase LimoenGroen)24Kitchen, the no. 1 platform for food lovers (Showcase LimoenGroen)
24Kitchen, the no. 1 platform for food lovers (Showcase LimoenGroen)
LimoenGroen
 
The Myths, Musts and Migraines of Migrations - DrupalJam 2018
The Myths, Musts and Migraines of Migrations - DrupalJam 2018The Myths, Musts and Migraines of Migrations - DrupalJam 2018
The Myths, Musts and Migraines of Migrations - DrupalJam 2018
LimoenGroen
 
Being a better mentor
Being a better mentorBeing a better mentor
Being a better mentor
LimoenGroen
 
Panels in Drupal: een EYE-opener
Panels in Drupal: een EYE-openerPanels in Drupal: een EYE-opener
Panels in Drupal: een EYE-opener
LimoenGroen
 
Drupal is Traag: handvatten voor een snelle site.
Drupal is Traag: handvatten voor een snelle site.Drupal is Traag: handvatten voor een snelle site.
Drupal is Traag: handvatten voor een snelle site.
LimoenGroen
 
Front-end Performance in Drupal
Front-end Performance in DrupalFront-end Performance in Drupal
Front-end Performance in Drupal
LimoenGroen
 
Wat is Drupal? Over Drupal in musea.
Wat is Drupal? Over Drupal in musea.Wat is Drupal? Over Drupal in musea.
Wat is Drupal? Over Drupal in musea.
LimoenGroen
 
Continuous Integration & Drupal
Continuous Integration & DrupalContinuous Integration & Drupal
Continuous Integration & Drupal
LimoenGroen
 

More from LimoenGroen (10)

Drupal Quick wins for an accessible website
Drupal Quick wins for an accessible websiteDrupal Quick wins for an accessible website
Drupal Quick wins for an accessible website
 
Open drupal DrupalCamp Gent 2018
Open drupal DrupalCamp Gent 2018Open drupal DrupalCamp Gent 2018
Open drupal DrupalCamp Gent 2018
 
24Kitchen, the no. 1 platform for food lovers (Showcase LimoenGroen)
24Kitchen, the no. 1 platform for food lovers (Showcase LimoenGroen)24Kitchen, the no. 1 platform for food lovers (Showcase LimoenGroen)
24Kitchen, the no. 1 platform for food lovers (Showcase LimoenGroen)
 
The Myths, Musts and Migraines of Migrations - DrupalJam 2018
The Myths, Musts and Migraines of Migrations - DrupalJam 2018The Myths, Musts and Migraines of Migrations - DrupalJam 2018
The Myths, Musts and Migraines of Migrations - DrupalJam 2018
 
Being a better mentor
Being a better mentorBeing a better mentor
Being a better mentor
 
Panels in Drupal: een EYE-opener
Panels in Drupal: een EYE-openerPanels in Drupal: een EYE-opener
Panels in Drupal: een EYE-opener
 
Drupal is Traag: handvatten voor een snelle site.
Drupal is Traag: handvatten voor een snelle site.Drupal is Traag: handvatten voor een snelle site.
Drupal is Traag: handvatten voor een snelle site.
 
Front-end Performance in Drupal
Front-end Performance in DrupalFront-end Performance in Drupal
Front-end Performance in Drupal
 
Wat is Drupal? Over Drupal in musea.
Wat is Drupal? Over Drupal in musea.Wat is Drupal? Over Drupal in musea.
Wat is Drupal? Over Drupal in musea.
 
Continuous Integration & Drupal
Continuous Integration & DrupalContinuous Integration & Drupal
Continuous Integration & Drupal
 

Recently uploaded

[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024
hackersuli
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Florence Consulting
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
xjq03c34
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
zoowe
 
Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?
Paul Walk
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
davidjhones387
 
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
bseovas
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
cuobya
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
SEO Article Boost
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
vmemo1
 
Gen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needsGen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needs
Laura Szabó
 
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
ukwwuq
 
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
fovkoyb
 
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
bseovas
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
Trending Blogers
 
Design Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptxDesign Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptx
saathvikreddy2003
 
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
uehowe
 
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
ysasp1
 
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
zyfovom
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
Danica Gill
 

Recently uploaded (20)

[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
 
Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
 
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
 
Gen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needsGen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needs
 
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
 
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
 
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
 
Design Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptxDesign Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptx
 
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
 
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
 
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
学位认证网(DU毕业证)迪肯大学毕业证成绩单一比一原版制作
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
 

Managing Drupal interface translation

  • 1. November 6, 2020 By: Erik Stielstra Managing Interface Translations
  • 2. Erik Stielstra Sr Drupal Developer & Mentor Contrib and Drupal 8 core development Created the D8 interface translation @Sutharsan
  • 3. Managing Interface Translations • Basic principles • The 3 types of translatable strings • Questions & Answers Article https://medium.com/limoengroen/how-to-deploy-drupal-interface-t ranslations-5653294c4af6
  • 4. Basic principles • Developer centric workflow • We prefer editing files over GUI • All translation files (.po) are stored in git * • All UI strings in custom code and theme are translatable.
  • 5. 3 sources of translatable strings • Strings in core and contrib modules • Strings in custom modules and theme • Custom translations that override the others
  • 6. 1. Translate core and contrib strings
  • 7. Translate core and contrib strings Enable module Download gettext Save file Import translations Add file to Git Interface Translation module
  • 8. Translate core and contrib strings Developer • Download and import module translations (drush 9+): drush pm:enable extra_field • Add translations to Git: git add ../translations
  • 9. Translate core and contrib strings Stage • Import translations from file: drush locale:check drush locale:update
  • 10. Translate core and contrib strings Interface Translation settings • Never check for updates • Only use local translation source • Only overwrite imported translations • Translations directory outside of drupal root: ../translations Development config override • Use local _and remote_ translation source $config['locale.settings']['translation']['use_source'] = 'remote_and_local';
  • 11.
  • 12. 2. Translate custom code and theme strings
  • 13. Translate custom code and theme strings Custom code Export with potx module Import translations Add file to Git Make po file
  • 14. Translate custom code and theme strings Developer • Create translation file (manually or with potx): example/translations/example.nl.po • Import translation to verify: drush locale:check drush locale:update • Add translations to Git: git add modules/custom/example/translations
  • 15. Translate custom code and theme strings Files • Added to example.info.yml interface translation project: example interface translation server pattern: modules/custom/%project/translations/%project.%language.po • Translation file modules/custom/example/translations/example.nl.po
  • 16. Translate custom code and theme strings Stage • Import translations from file drush locale:check drush locale:update
  • 17. 3. Translations that override the others
  • 18. Translations that override the others Export with potx module Import translations Add file to Git Make po file
  • 19. Translations that override the others Developer • Create translation file: ../translations/custom-translations.{langcode}.po • Import translation to verify: drush locale (drush 9.5+): drush locale:import nl ../translations/custom-translations.nl.po --type=customized --override=all • Add translations to Git: git add translations/custom-translations.*
  • 20. Translations that override the others Stage Import custom translations from file to override other translations (drush 9.5+): drush locale:import nl ../translations/custom-translations.nl.po --type=customized --override=all
  • 22. If you don't want to store translations in git • Use https://github.com/drupal-composer/drupal-l10n • Use local source in dev (do not override in settings.php)
  • 23. How to deploy Drupal interface translations https://medium.com/limoengroen/how-to-deploy-dr upal-interface-translations-5653294c4af6
  • 24. Image attributions • DrupalJam 2008 by Bert Boerland; CC by-nc-sa 2.0 • DrupalJam 2010 by Boris Doesborg; CC by-nc-sa 2.0 • DrupalJam 2011 by Gerard Mourits; CC by 2.0 • DrupalJam 2014 by Daniël Smidt; CC by-nc-sa 2.0
  • 25. Managing Interface Translations Slides online: https://www.slideshare.net/LimoenGroen/managing-drupal-interface-translation License: https://creativecommons.org/licenses/by-nc-sa/2.0/