March 2019
Intermediate to advanced
580 pages
15h 3m
English
So far in this chapter, we've mostly talked about how to ensure that our modules output only text that can also be translated. The Drupal best practice is to always use these techniques regardless of whether the site is multilingual. You never know if you'll ever need to add a new language.
In this section, we are going to talk a bit about how we can interact with the language system programmatically and work with entity translations.
A potentially important thing you'll often want to do is check the current language of the site. Depending on the language negotiation in place, this can either be determined by the browser language, a domain, a URL prefix, or others. The LanguageManager is the service ...
Read now
Unlock full access