Make it multilanguage
- Printer-friendly version
- 147 reads
The multilanguage functionality we provide consists of:
- the possibility to provide for several choosen languages a translation of all displayed text on the site for anonymous or registered visitors. This does not always cover the whole administration interface available for the webmaster.
- the display language being determined by the user's language preferences from the My Account page, or by the browser's language settings of the visitor. If a presentation language cannot be determined, the default language is used. A language switcher to override this behaviour is available on every page.
- for any other language available by Google translate but not covered by the choosen languages above, the possibility to translate the page is offered depending on the visitor's browser language.
1. The displayed text on the website can be divided in:
- the administrative interface
- nodes (content)
- blocks
- menus
- taxonomy (category terms)
- views (lists of data)
- other tranlatable strings (e.g. controls like prev | next)
- Site texts like the slogan and mission
To accomplish this we have to activate and apply a combination of modules which will be described step by step bellow.
1.1 The administrative interface
Enable the Locale module (Core - optional), Localization client (Multilanguage) and Localization update. Go to admin/settings/language and activate the desired languages. Reimport the packages (/admin/build/translate/import/package) and update them (/admin/build/translate/update). After this most interface strings should be translated (check on tranlate interface overview, /admin/build/translate/overview).
1.2 Nodes (content)
Used modules:
Content translation (core - optional)
Internationalization (i18n)
A collection of modules to extend Drupal core multilingual capabilities and be able to build real life multilingual sites. Some features:
- Taxonomy translation (both, per language terms and translatable terms)
- Multilingual variables
- Multilingual blocks (control visibility per language and translate title and content)
- Language selection (when you switch the site language you'll see only the content for that language)
Provides a table listing the site's nodes and showing what's been translated into each language. It also lets you assign priorities for translating nodes into the various languages.
4. Menus
On a clean D6 install (skip what you've already done):
- Download the modules Internationalization drush dl i18n
- Enable Menu translation (a submodule of Internationalization), admin/build/modules. Depends on: Internationalization, Menu, Block translation, String translation, Locale, Content translation
- Add a language, admin/settings/language/add
- Open the form to add a menu item, admin/build/menu-customize/primary-links/add
8. Site texts like the slogan and mission
Alter the settings.php file in sites/default and add the following snippet (should work in Drupal 5 & 6). (source) :
$conf['i18n_variables'] = array(
// Site configuration
'site_slogan',
'site_mission',
'anonymous',
);



