Summary
In this short chapter, we talked about the Drupal multilingual and internationalization system from a module developer perspective. We started with an introduction to the four main modules responsible for languages and translating content, configuration entities, and interface text.
Then, we focused on the rules and techniques we need to respect to ensure that our output text can be translated. We saw how we can do this in PHP code, Twig, and YAML files, and even in JavaScript. Finally, we looked a bit at the language manager and the Translation API to see how we can work with content entities that have been translated.
The main takeaway from this chapter should be that languages are important in Drupal even if our site is only in one language. So, in developing modules, especially if we want to contribute them back to the community, we need to ensure that our functionality can be translated as needed.
In the next chapter, we are going to talk about data processing...