Use multiple domain names in combination with multiple languages

Events happening in the community are now at Drupal community events on www.drupal.org.
moreonion's picture

Hello everyone!

I'm currently working on a site that uses multiple languages and for SEO purposes (and some other reasons) we want to use multiple domain names in combination with content translation

So we're talking about a SINGLE website and ONE database:

for an example www.dummydomain.com is supposed to point to the site in english
www.dummydomain.de points to the SAME site only in german
www.dummydomain.fr to the SAME site in french

Now I'm wondering what creative solutions you guys come up with to achieve this.

As far as I know Drupal supports www.dummydomain.com/de automatically so that people end up with the german translation but that's not going to lift the page rank on google germany.

What do you think?

Cheers,
Florian

Comments

Use Domain Access with Translations enabled

sainzu's picture

@moreonion,

You can use Domain Access with Translations module enabled. This way you can default a particular language to one domain... sort of like one-to-one mapping. When you add a language, you can specify how you want the language-specific pages to be displayed, i.e. whether you want to use path-prefix (eg. de.dummydomain.com), path-suffix (eg www.dummydomain.com/de) or whether you want to use a separate domain (eg. www.dummydomain.fr). In your case you want to select separate domain.

In additional, Translation Overview module gives you a wonderful "overview" of what content/node needs to be translated and what has been translated already, etc.

A good case-study to look at : http://drupal.org/Dahon-Folding-Bicycles

Hope this is a good start.

Correction

sainzu's picture

by "Translations module" I meant to say "Content translation" core (optional) module and "Locale" module.

That's pretty easy. You make

btopro's picture

That's pretty easy. You make multiple settings.php files by setting up your sites directory like this

sites/
sites/all
sites/default/settings.php
sites/de/settings.php
sites/fr/settings.php

You install drupal via the default address (the .com) then set it up so you have locale or whatever to do the different site versions. Then you copy the settings.php file over to the de and fr site folder.

Open up one of the settings.php files and you should see text like this --

$conf = array(

'site_name' => 'My Drupal site',

'theme_default' => 'minnelli',

'anonymous' => 'Visitor',

This is indicating that you can override specific database settings at the settings.php level. SO, you point to the same exact DBs and have all the same content but then can tweak these settings to say locale = french or whatever it is. I'm not sure of the exact locale settings you'd need to setup but this is my guess.

You'll obviously need all the domains pointing to the same server root to do this.

Hope this gets you in the right direction

Don't need to dwindle with settings.php

sainzu's picture

@btopro,

With Domain Access module you don't need to play around with settings.php files. You get a simple interface to create domain records and the settings you mentioned for each of those domains.

Yes you'll need to point all the domains to the same drupal installation root.

that's another way of doing

btopro's picture

that's another way of doing things yes

Frankly simply

moreonion's picture

@sainzu thank you - the function is kind of hidden if you ask me though...

it does work properly, I'm just wondering why exactly there is no reference pointing to that option - but I guess usability improvements go on the wishlist ;-)

Just a simple solution

pendashteh's picture

you install drupal and configure database

  1. now you should point all three domains to the same directory.
    • either use sites/default directory
    • or use symbolic links to map sites/domain.fr and sites/domain.de to sites/domain.com directory
  2. configure settings.php to set default language base on the requested domain:
    <?php
          
    // settings.php
           
    $language = array(
            
    'language' => 'en',
            
    'name' => 'English',
              
    'native' => 'English',
            
    'direction' => 0,
               
    'enabled' => 1,
             
    'plurals' => 0,
             
    'formula' => '',
              
    'domain' => '',
               
    'prefix' => '',
               
    'weight' => 0,
              
    'javascript' => ''
         
    );

            if (
    false !== strpos($_SERVER['HTTP_HOST'], '.fr')) {
             
    $language['language'] = 'fr';
             
    $language['name'] = 'French';
             
    $language['native'] = 'French';
            } else if (
    false !== strpos($_SERVER['HTTP_HOST'], '.de')) {
              
    // so on...
           
    }

        
    $conf['language_default'] = (object) $language;
         
    ?>

I am in similar situation,

marek.d's picture

I am in similar situation, trying to setup a bilingual Drupal 7 site, each language needs its own domain.

My question is how to set this up, Internationalization and Domain Access + Domain Variable?

Any help with how to set this up would be very appreciated.

Multisite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: