i18n setup for the Domain Access module

This is a summary of the process of how to setup a multilingual site with domain access. Please feel free to edit any parts which are incorrect or that may confuse users. Content is based on how we made our sites work and on this tutorial by Jose Reyero:
http://reyero.net/drupal/internationalization_domain_access_multilingual...

If you have installed Domain Access and all seems to work fine, but then you want some domains (or subdomains) to be in different languages, for example:
- maindomain.com (english)
- sub.domain.com (french)
- domain2.net (spanish)
- sub.domain2.net (spanish)
- domain3.com (english)
- domain4.org (german), etc.

The following is assuming you correctly setup your affiliate domains and/or subdomains in your settings.php file.

Change the default language
1. Enable the correct modules (Domain Access, Domain Variable, Domain Locale, Internationalization & Variable). See links to these modules at the end of this page.

2. Enable the languages you will be using here: admin/config/regional/language

3. Enable URL detection method here (must be Path prefix): admin/config/regional/language/configure

Variable translation

The Variable translation module, part of the Internationalization (i18n) package, allows you to translate text and settings that are stored in Drupal as variables. These variables include text such as 'site name' and 'site slogan', as well as settings like 'Default front page' and 'Default 404 page'.

Dependency

The Variable translation module has a dependency on the Variable module.

Support for Contributed Modules

Variables provided by contributed modules can also be translated by the Variable translation module if they implement hook_variable_info(). For documentation, see the Variable module project page.

Usage

To enable multilingual variables (Figure 1):

  1. Enable the Variable translation module included with the Internationalization package
  2. Go to Administration > Configuration > Regional and language > Multilingual settings
  3. Click on the Variables tab
  4. Select the variables that will be multilingual
  5. Click Save configuration button

Figure 1

Multilingual variables (Drupal 6)

For Drupal 7, see the Variable Translation module documentation.

Some text and settings are stored in Drupal as variables, and some site-wide ones like 'site name' and 'site slogan,' along with module-specific ones, can be edited through the administration pages. The Internationalization package makes it so these variables can be translatable.

To enable these variables to be translatable we need to identify the low-level names Drupal uses for them. This can be done looking at the 'variable' table in the database or searching through the code. However, we'll show you how to translate the more common settings below.

Once you have identified the variables you want to be translated, they need to be added in the settings.php file for the site as follows:

/**
* Multilingual settings
*
* This is a collection of variables that can be set up for each language when
* internationalization (i18n) is enabled. These are the basic ones for Drupal
* core, but you can add your own here.
*/
$conf['i18n_variables'] = array(
// Site name, slogan, mission, etc..
'site_name',
'site_slogan',
'site_mission',
'site_footer',
'anonymous',
// Different front page for each language
'site_frontpage',
// Primary and secondary links
'menu_primary_links_source',
'menu_secondary_links_source',
// Contact form information

Subscribe with RSS Subscribe to RSS - multilingual variable