******************************************************************** D R U P A L M O D U L E ******************************************************************** Name: i18n module Author: Jose A. Reyero Email: drupal at reyero dot net ************************************************************** Current version of this module works with Drupal 4.5.1. May work also with 4.5.0, waiting for some feedback about this. ************************************************************** This is an 'advanced module', requires core and database patching and has some low level configuration options. Thus, it is only intended for Drupal advanced users and administrators. **************************************************************** INSTALLATION: ============ 1. Create folder 'modules/i18n', and copy all the modules files, keeping directory structure, to this folder. 2. Apply the patches to the Drupal core that are provided. Required patches are for 'bootstrap.inc', 'module.inc', 'common.inc', 'node.module' and 'taxonomy.module'. ** Patches for other modules will be available soon but they will be required only if you want that specific module to be 'language aware' ** All patches are against Drupal 4.5.1 Also, apply the database modifications from the SQL file 'i18n.mysql.' All of these modifications are located in the "patches" folder. After applying the patches, you can safely remove this folder. Language Definition =================== You can use the languages defined -and enabled- in 'locale' module or modify the Drupal configuration file 'includes/conf.php' to define the languages you want to use. For instance, for English and Spanish: $i18n_languages = array("es" => "spanish", "en" => "english"); Add any flag icons beyond the ones provided by placing them in 'modules/i18n/flags'. You can get more flag icons from: http://www.clickfire.com/content/graphics/favicons/flags_icons.php * Yes, I know I could add a lot more to the module's tar file, but I want to keep the download as small as possible, so the current policy is including with the module only the ones I think will be more use, and the ones asked for by other module contributors. Language dependent variables ============================ The list of variables to be made language dependent must be defined in the configuration file (includes/conf.php): I.e. $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', ); These are only the 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, just for some limited backwards compatibility and experimentation] 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 $db_prefix_i18n in .conf file. This is a sample: $db_prefix=array ( 'default' => 'prefix_', // The default prefix ); $db_prefix_i18n = array ( // '**' will be replaced by language code at runtime. 'table1' => 'prefix_**_' 'table2' => 'prefix_**_', ); If you want to experiment with different tables, you may find this useful [Drupal ERD]: http://lists.drupal.org/pipermail/drupal-support/attachments/20030530/7a6fd04a/cdm1-0001.png POST-INSTALLATION/CONFIGURATION: ============ - Enable the module in administration > modules - Configure the module in administrations > settings > i18n - Check the node types to be made multilingual A new field 'language' and a new tab 'translations' will be available when editing these node types - Enable the language selector block in administration > blocks - Set up language for existing nodes, editing them manually or directly updating in the database. I.e. provided that all your existing nodes are in english: UPDATE node SET language='en' - 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 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, drupal at reyero dot net, http://freelance.reyero.net Feedback is welcomed.