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
At this point. DO NOT try to make your domains into a different language other than english yet or you will get a "The page isn't redirecting properly" error. You must continue setting up before you can actually change the languages per domain/subdomain. You will note that if you try to edit the default language using the batch edit, it only shows "english" as an option. You must first enable the languages per domain.
4. Go to your domain list. Go to EACH domain individually and click on "edit domain". Click on "languages" tab and enable the desired languages for this domain and select the default. Then go to the "settings" tab, under "regional settings" select the default language you want the front end to be.
admin/structure/domain
At this point if you change the language on a domain or subdomain, you will not get any "The page isn't redirecting properly" errors. If you get these errors when switching languages, it is likely you skipped step four.
Enable site name translation and/or other variables:
1. Enable the variables that you want translated in the domain variables: admin/structure/domain/variables
2. Enable the variables that you want translated in multilingual variables: admin/config/regional/i18n/variable
See this article for details:
http://reyero.net/drupal/internationalization_domain_access_multilingual...
Make pages fully translatable using the language switch block
The instructions below are taking into consideration that you have already done the instructions above to change a domain's default language and have selected variables you want translated.
1. Enable the correct internationalization modules. Usually you want to enable "Block languages, Menu translation, Taxonomy translation, Synchronize translations, Translation sets".
NOTE: Multilingual content module works on regular drupal sites but NOT with domain access. Domain access uses its own content module. That is why if you enable Multilingual content module, you do not have the "translate" tab on the content to translate it. Below we will show you a work around for this problem until someone updates the domain access content module to work with Multilingual content module.
2. Create your menu items as usual. Then click on "edit" menu item and click on top "translate" tab. Enter translations. When done, they should show on your "Translation sets" table showing that they are a pair.
3. Do the same translations to taxonomy, blocks, etc. and make sure they show as a set in the "Translation sets" table: admin/config/regional/i18n_translation
4. At this point your site is almost translated. We need to be able to translate the content. Create a new content node, example, new Basic Page. Select language and save. Then create same Basic Page in different language (as a new node). For example, my english content was "node/1" and my spanish content was "node/2".
5. Now we have to pair them together or make them sets. Go to "Translation sets" in the "path" tab.
admin/config/regional/i18n_translation/path
Create a new set using the content you created.
english = "node/1" and spanish = "node/2" and create set.
Now when you visit your site and you click the change language link, everything will change. Menus, blocks and content.
NOTE: If you have domain access module enabled, make sure you select the same domains in the domain access options in every language you create. If you do not, it might generate errors since they will be a pair, but one is not allowed to show in that specific domain. Content must be allowed to show on same domains as translated content. Again, this is something that must be done manually since domain access content module does not work with Multilingual content module. If these two were compatible with each other, they system would auto select the same domain access options by default and save you that time. Lets hope a good Samaritan makes this possible for us all. :)
Links:
Domain Access module
Domain Variable module
Domain Locale
Internationalization module
Variable module
See attached zip file for previews of changing variables taken from
http://reyero.net/drupal/internationalization_domain_access_multilingual...
Attachment | Size |
---|---|
previews.zip | 1.02 MB |