Drupal Multilingual setup and thoughts

Some notes and experiance on setting up a Drupal site with multilingual. Not a complete guide.

  1. Always begin by setting up multilingual first, before you do other setups or create content. Give nodes a language.
  2. Footer, add following code to settings.php. Then on admin/settings/settings/site-information, you will find, beneath footer textarea, "This is a multilingual variable." You have to change the path prefix to see the different language versions.
  3. When using views on a multilingual site ther seems not to be any support, more than selecting the nodes language. The URL alias, path, remains the same. So the swedish view will have an english URL alias, if english is used as default in the view. Of course you can add an extra URL alias. The same goes for the menu item, you can only have one menu item. Then you have to manually add a menu to the menu system or use Node symlinks get an extra menu item.
    One nice workaround is to embed views in content. Then you can even have full automatic URL alias just as any other node. You have full support for translation of node. You get a unique menu item for each language and the same for breadcrumbs.
    So when creating this view just filter nodes by user language, let the header and footer text be in the node instead of being in the view.
  4. I prefer using [menupath-raw] as token for all content. And then use menu bredcrumb module.
  5. Translation support and Node symlink is not a good combination.
  6. Avoid duplicate content for translation complexity and for SEO reason.
  7. Some useful modules:
    Menu Block 6.x-2.3 Provides configurable blocks of menu items.
    MultiBlock 6.x-1.3 Allows the creation of multiple instances of blocks
    Menu breadcrumb 6.x-1.3 Allows you to use the menu the current page belongs to for the breadcrumb.

<?php
/**
 * Multilingual settings
 *
 * This is a collection of variables that can be set up for each language when 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
 
'contact_form_information',
 
// For theme variables, read more below
  //'theme_settings',
  //'theme_garland_settings',
);
?>
<code>

Begin here Tutorial - Building a multi-language site

Language codes ISO 3161 and ISO Language Code Table

Knowledge keywords: