This plugin allows you to switch the domain-name as soon as a specific language is selected. Each domain is bound to a language, by configuring the plugin parameters. Once enabled, the plugin detects the current domain name, checks the current language, and redirects to a new domain if needed.
I just tested this plugin and I recommend it! Very simple to set up and immediately effective! Thanks :)
A valid entry for domain-bindings could be:
en-GB=example.co.uk fr-FR=example.fr de-DE=example.de nl-NL=example.nl
You can also specify additional domains like this:
This will enforce the language Dutch to the domain
example.nl while any request to
www.example.nl will also redirect to
example.nl. So, the first domain in the column-separated list is considered the primary domain for that language.
Note that this plugin treats domains and subdomains as the same thing.
This plugin has received great improvements from various contributors for which we are very thankful: Jisse Reitsma, Ruud van Zuidam, Sérgio Alves.
Falang is not supported. If you do want to play around with Falang combined with this plugin, make sure to try to re-order the plugins (especially the Falang plugins, the System - SEF plugin and the Language Domains plugin) to see if this works for you. We have had Falang environments where things worked and Falang environments where things did not work.
If you are using Falang and this is working for you, you might bump into the issue that language switching works on all pages except for the homepage. The problem is not within the Language Domains plugin, but in the Falang Language Switcher module. Create a template override of the file
modules/mod_falang/tmpl/default.php, locate the
foreach loop of the languages and add the following line right after the
if (empty($language->link) || in_array($language->link, array('/', 'index.php'))) $language->link = '/?lang='.$language->sef;
Make sure to remove all cookies when you are testing with this plugin. Alternatively restart your browser.
Make sure to disable the System - Language Filter plugin, when this plugin is enabled.
When using caching, beware of using the Sytem - Cache plugin. Under Joomla! 2.5, that plugin does not cache content on a domain-level, so therefor all cache is the same for all domains. Simply put, plugins like ours are not compatible with the System - Cache plugin under Joomla! 2.5. Under Joomla! 3, using the cache-plugin is definitely possible. Test things first with the cache-plugin disabled. If you are enabling the plugin, make sure its ordering is higher than this System - Language Domains plugin - so that the cache-plugin is loaded after this plugin. Also make sure to wipe out the page-cache by using the Cache Manager.
When using the System - SEF plugin to translate links in your content, make sure it is loaded after the Language Domains plugin.
Note: This plugin does not work together with JSN ImageShow, which unfortunately uses Flash parameters that include tons of URLs, which can't be parsed in a reasonable way.