******************************************************************** D R U P A L M O D U L E ******************************************************************** Name: i18n module and translation module Author: Jose A. Reyero Email: drupal at reyero dot net ******************************************************************** This is the 5.x version of i18n module, and works with Drupal 5.x ******************************************************************** ******************************************************************** Updated documentation will be kept on-line at http://drupal.org/node/67817 ******************************************************************** INSTALLATION: ============ 1. Create folder 'sites/all/modules/i18n' and copy all the modules files, keeping directory structure, to this folder. 2. If updating, run the update.php script following the standard procedure for Drupal updates. POST-INSTALLATION/CONFIGURATION: ============ - Enable the module/s in: Administer > Site building > modules These modules are grouped under 'Multilanguage - i18n' package Recommeded default is to enable: Internationalization, Translation * Other modules are for very specific features. - Configure the modules in Administer > Site Configuration > Multilingual system You might get an error message about languages not being enabled yet. Visit the suggested page (Manage Languages) and enable the languages you need. In case you find out they're already enabled, just press the button "save configuration". - Enable multilingual support for each content type you want to translate administer > content management > content types > edit (for each type separately) A new field 'language' and a new tab 'translations' will be available when editing these node types - There are now two language blocks - A simple language switcher provided by i18n.module - A translation block provided by translation.module - Set up language for existing nodes, editing them manually. - Set up language for existing taxonomy terms Only terms in the node's language or terms without language will show up when editing a node Language Definition [NEW for Drupal 5] =================== RECOMMENDED: You can use the languages defined -and enabled- in 'locale' module ADVANCED, EXPERTS ONLY: Modify the Drupal configuration file '../settings.php' to define the languages you want to use. For instance, for English, Spanish: $conf['i18n_languages'] = array( 'site_default' => 'en', // Default language 'name' => array('es' => "Spanish", 'en' => 'English'), // English names for languages 'native' => array('es' => "Español", 'en' => 'English'), // Native names 'enabled' => array('es' => TRUE, 'en' => TRUE), // Languages enabled // 'rtl' => array('es' => TRUE), // This only if Spanish were an RTL language, which is not ); * This will override languages defined by locale module Language dependent variables ============================ The list of variables to be made language dependent must be defined in the config file: I.e. $conf['i18n_variables'] = array( // Site configuration 'site_name', 'site_slogan', 'site_mission', 'site_footer', 'anonymous', // Node help 'blog_help', 'story_help', // User configuration 'user_registration_help', 'user_mail_welcome_subject', 'user_mail_welcome_body', 'user_mail_approval_subject', 'user_mail_approval_body', 'user_mail_pass_subject', 'user_mail_pass_body', // Primary and secondary links 'menu_primary_menu', 'menu_secondary_menu'; // Theme settings. This is an 'all or nothing' for each theme // This is for 'garland' theme, for other theme it would be 'theme_[themename]_settings' 'theme_garland_settings', ); These are only some suggested ones, but you can add as many Drupal variables as you want to the array. You need to redefine these variables for the first time for every language, as previous values are lost and they return to defaults -they will be back if you disable i18n-. Language dependent tables ========================= [ADVANCED, NOT REQUIRED, HANDLE WITH CARE, MAY BREAK YOUR SITE, just for experimentation and *really advanced* use] This module can manage language dependent tables, which means you can have different specific tables for each language, and the one for the current language will be selected at run time. You need to modify $db_prefix and add a new global variable $db_prefix_i18n in .conf file. This is a sample: $db_prefix=array ( 'default' => 'prefix_', // The default prefix ); [IMPORTANT UPDATE: The way to add a new global variable, since Drupal 4.7 is through the $GLOBALS array] $GLOBALS['db_prefix_i18n'] = array ( // '**' will be replaced by language code at runtime. 'table1' => 'prefix_**_' 'table2' => 'prefix_**_', ); Additional Support ================== For support, please create a support request for this module's project: http://drupal.org/project/i18n If you need professional support, contact me by e-mail: freelance at reyero dot net ==================================================================== Jose A. Reyero, freelance at reyero dot net, http://www.reyero.net Feedback is welcomed.