providing a code snipet with support for the default i18n settings in the array, and also another sample for pathauto.

the difference here is that they are split into two blocks, by using array_push function to inject the new variables in the existing array.

by not combining everything in the same code chunk, it is more easy to add new variables suggested by modules in code snipets, or disable existing ones without necessitating a rewrite of the code.

 * 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(
if (!is_array($conf['i18n_variables'])) $conf['i18n_variables'] = array(
  // Site name, slogan, mission, etc..
  // Different front page for each language
  // Primary and secondary links
  // Contact form information
  // For theme variables, read more below

 * Multilingual settings - Pathauto
 * Variables for Pathauto usage.
if (is_array($conf['i18n_variables'])) array_push($conf['i18n_variables'],
  // pathauto
  'pathauto_node_pattern', // General pattern for nodes
  'pathauto_node_blog_pattern', // Pattern for blog nodes
  'pathauto_node_forum_pattern', // Pattern for forum nodes
  'pathauto_node_poll_pattern', // Pattern for poll nodes
  'pathauto_node_story_pattern', // Pattern for story nodes
  'pathauto_node_page_pattern', // Pattern for page nodes
  'pathauto_node_book_pattern' // Pattern for book nodes

posting the same code for pathauto module


lpalgarvio’s picture

pathauto issue here:

lpalgarvio’s picture

note: Dave Reid, a co-maintainer of Pathauto, has just stated that these variables do not apply to pathauto:

Posted by Dave Reid on October 20, 2010 at 10:03pm

That documentation is completely wrong and does not actually work properly with Pathauto. There are *already* per-language variables defined by pathauto.


the method is still valid for other variables though

adraskoy’s picture

It would also be nice to see examples showing how to include variables that are part of fieldsets, or mention if this is even possible. For example, in the Signup Status module there are variables such as:


It's not at all clear how to get these to be multilingual.

lpalgarvio’s picture

Title: suggestions for settings.php config snipet » suggestions for settings.php
Version: 6.x-1.x-dev » 6.x-1.9
Category: task » feature
Status: Active » Reviewed & tested by the community
Jose Reyero’s picture

Status: Reviewed & tested by the community » Closed (won't fix)

This should go into the handbook.