Internationalization

i18n setup

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

Read more

Menu translation

While building another multilingual site - this time in D7 - am back at the point of how to deal with the menus.
Note that, though the "Contact" module (the contact form) is part of Drupal core, the translation of its menu title requires the "internationalization" contributed module. See HowTo: Basic Internationalization setup.
I had a brief look at the new translation functions in D7 and they all look a good step forward - for ex. see more here:

But translating a website is not a simple thing and the ins and outs are quite complex - just think about the admin language you know all the terms in (your personal default) and then look at those translation into one or another language you also master - often there is no correlation and you need to switch back and forth to work your way through things.

While simply translating a menu is great in many cases there are certain limitations.

This time I am building a website for proximity searches - the background for this project is here - Openlayers Proximity Search – D7 - the background.

Read more

Contact translation

The Contact translation module, part of the Internationalization (i18n) package, helps with the multilingual configuration of the site contact forms.

Dependency

The Contact translation module has a dependency on the core Contact module.

Usage

  1. Enable the Contact translation module included with Internationalization
  2. Go to Administration > Structure > Contact form
  3. Click edit for the form to configure
  4. Click the Translate tab
  5. Click the translate link for a language
  6. Translate the Category and Auto-reply text
  7. Click Save translation
  8. Repeat steps 5 to 7 for each language
  9. Repeat steps 2 to 8 for all forms

How to define a default installation language

Before proceding to the language selection form, the drupal install.core.inc execute this code

<?php
  $function
= $profilename . '_profile_details';
  if (
function_exists($function)) {
   
$details = $function();
    if (isset(
$details['language'])) {
      foreach (
$locales as $locale) {
        if (
$details['language'] == $locale->name) {
         
$install_state['parameters']['locale'] = $locale->name;
          return;
        }
      }
    }
  }
?>

It searches for a function named PROFILENAME_profile_details() and if it is found, it searches for a variable 'language' to set it as installation language, without asking for it.
This is an example funtion to set Spanish as default language with an installation profile called 'spanish'.

<?php
function spanish_profile_details(){
 
$details['language'] = "es";
  return
$details;
}
?>

This function should be located in the PROFILENAME.profile file.

Translation redirect

The Translation redirect module, part of the Internationalization (i18n) package, improves search engine optimization (SEO) for multilingual websites. By default, multilingual pages can be accessed via different paths by changing the path prefix or domain. Search engines tend to penalize displaying the same content at more than one URL, so it's important to redirect to a single instance of the page.

The Translation redirect module redirects anonymous users (including web crawlers) to the translation of the page in the requested language, if it exists, using a 301 redirect code. For example, if the request is for /de/node/23 and node/23 corresponds to an English page, the user will be redirected to the German translation of the English node if it exists. If the translation does not exist, then the source node content is displayed.

Note that, by design, translation redirection does not work for the homepage or for authenticated users.

Design and Dependencies

Read more
Subscribe with RSS Syndicate content
nobody click here