It is possible to customize the language negotiation process both for how we detect the user's language and also on what type of data they are requesting.
The language negotiation API is based on two major concepts:
- Language types, which describe the possible types of translatable content
- Language providers, which allow Drupal to detect which language it should serve to the user (note that language providers are called language methods in Drupal 8)
Defaults provided by Drupal
Drupal core defines three built-in language types:
- Interface language
- It is the page's main language. It is used to present translated user interface elements such as titles, labels, help text, and messages.
- Content language
- This is used to choose in which language to display content that is available in more than one language (see the multilingual capabilities of the new Field API for details).
- URL language
- This is the language associated with URLs. When generating a URL, this value will be used by
By default, Drupal includes support for language negotiation using a variety of methods. This means your site can offer multilingual content without forcing the user choose their language before entering the site. There is no need to use a splash page to choose a language when you use Drupal!
The built-in methods for negotiating language are:
- URL - Determine the language from the URL (Path prefix or Domain).
- Session - Determine the language from a request/session parameter.
- User - Follow the user's language preference.
- Browser - Determine the language from the browser's language settings.
- Default language - Use the default site language (English).
You can enable and re-order these methods through the 'Language Detection and Selection' user interface at Configuration > Regional and Language > Languages > Language Detection and Selection.Read more
If you are expecting a string provided by a core or contributed module to show up in the Translate interface UI and do not see it, it is often because the string has not yet been registered within Drupal.
So, if there exists an untranslated string, e.g.
'this text', you must visit the URL that displays the text in question with a non-default language. For example, if
'this text' shows up at
/some/path, switch to a different language and then visit
/some/path. This will register the
'this text' string so it can then be found using the Translate interface UI at
The Localization update module helps you keep your interface translations for core and contributed modules up-to-date by grabbing them from the central Drupal translation repository (localize.drupal.org) or another Localization server. This means that you do not have to download and import translations manually. This module requires enabling the Locale (core) module. These are the steps to installing the module:
- Enable the Locale (core) module
- Download and enable the Localization update module
- Go to the configuration page at:
admin/build/translate/update(Drupal 6) or
- Wait patiently as the module looks for translation updates for you
- Click Update translations button
- Wait patiently as the module gets all your translations
- (optional, but recommended) Configure settings to get updates regularly via cron at:
admin/settings/language/update(Drupal 6) and
From README.txt (needs to be better incorporated)
The Multilingual forum module, part of the Internationalization (i18n) package, helps with the multilingual configuration of the site forums.
The Multilingual forum module has a dependency on the core Forum module and the Taxonomy translation and Multlilingual content modules from the Internationalization package.
Configure forum vocabulary
- Enable the Multilingual forum module included with Internationalization
- Go to Administration > Structure > Taxonomy
- Click edit vocabulary for the Forums vocabulary
- Choose the translation mode (Localize or Translate)
- Click Save and translate button
- Click translate link for a language
- Translate the Name and Description for the forum
- Click Save translation button
- Repeat steps 6 to 8 for each language
Configure forum terms
- Go to Administration > Structure > Forums
- Click edit link for a forum or container
- Click Translate tab
- Click translate link for a language
- Translate the Name and Description for the term
The Contact translation module, part of the Internationalization (i18n) package, helps with the multilingual configuration of the site contact forms.
The Contact translation module has a dependency on the core Contact module.
- Enable the Contact translation module included with Internationalization
- Go to Administration > Structure > Contact form
- Click edit for the form to configure
- Click the Translate tab
- Click the translate link for a language
- Translate the Category and Auto-reply text
- Click Save translation
- Repeat steps 5 to 7 for each language
- Repeat steps 2 to 8 for all forms