Skip to content
INSTALL.txt 3.86 KiB
Newer Older
********************************************************************
                     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

Jose Antonio Reyero del Prado's avatar
Jose Antonio Reyero del Prado committed
**************************************************************
Current version of this module works with Drupal 4.5.1.
May work also with 4.5.0, waiting for some feedback about this.
**************************************************************
Jose Antonio Reyero del Prado's avatar
Jose Antonio Reyero del Prado committed
INSTALLATION:
============
Jose Antonio Reyero del Prado's avatar
Jose Antonio Reyero del Prado committed
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 'node.module', 'taxonomy.module', 'bootstrap.inc', and 'common.inc'.  
  	** Patches for other modules will be available soon but they will be required only if you want that specific module to be 'language aware'
  	
  	Also, apply the database modifications from the SQL file 'i18n.mysql.'  
  	All of these modifications are located in the "patches" folder.
Jose Antonio Reyero del Prado's avatar
Jose Antonio Reyero del Prado committed
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");
Jose Antonio Reyero del Prado's avatar
Jose Antonio Reyero del Prado committed
Add any flag icons beyond the four 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.
Jose Antonio Reyero del Prado's avatar
Jose Antonio Reyero del Prado committed
Language dependent variables
============================
  The list of variables to be made language dependent must be defined in the config file:
Jose Antonio Reyero del Prado's avatar
Jose Antonio Reyero del Prado committed
  I.e.
Jose Antonio Reyero del Prado's avatar
Jose Antonio Reyero del Prado committed
	$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.
	
  The variables added to the list must be redefined for the first time for every language, as previous values are lost and they return to defaults.
	
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.

Jose Antonio Reyero del Prado's avatar
Jose Antonio Reyero del Prado committed
		'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

Jose Antonio Reyero del Prado's avatar
Jose Antonio Reyero del Prado committed
Additional Support
==================
For support, please create a support request for this module's project: http://drupal.org/project/i18n
Jose Antonio Reyero del Prado's avatar
Jose Antonio Reyero del Prado committed
If you need professional support, contact me by e-mail: freelance at reyero dot net
Jose Antonio Reyero del Prado's avatar
Jose Antonio Reyero del Prado committed

====================================================================
Jose A. Reyero, drupal at reyero dot net, http://freelance.reyero.net

Feedback is welcomed.