Determining how the current language is selected
Out of the box, Drupal is capable of determining which language it should show for both the content and user interface without much more than adding a few settings from the admin screen. This is a required step in making sure that, at all times, the appropriate language is used for each user when presenting content.
The following recipe will show you how to set the parameters for how Drupal decides which language to use to present content on a page to a user. There are a handful of ways you can detect the language to use.
Getting ready
First, log in to your Drupal site and go to the Extend section of the admin. Enable the Language, Content Translation, and Interface Translation modules.
How to do it…
- Next, navigate to the Administration | Configuration | Regional and Language | Languages sections of the admin.
- Click on the Detection and selection tab. There are two sections on this screen:
- The top section...