multilanguage6 - i18n module - multilingual variables

Created by janroe

This is in ancient Drupal history and needs an update. Be careful.

drupal internationalisation module (i18n) - multilingual variables
http://drupal.org/project/i18n 6.x-1.1 on 6.14

Moved here as multilanguage3-1 became too long:

Multilingual variables:
You can add multilingual variables to the settings file in order make them translatable. But that translation is a completely different way from string search and translation!!!

This is what is what should be added, most of the comments (/**, *, */, //) are my own.

I use multisite, so its in every multisite settings file. If not using multisite, it's only needed for the default settings file. Before anyone copies this, I have problems with it (explained below):

/** * You are in: SITE NAME - DEFAULT (english) - /jr * Multilingual settings for i18n module / according to http://drupal.org/node/313272 * * Variables added identically to every settings file in the multisite setup (default, de, es, fr, etc. directories), typically at the bottom. * * To change the variables values for Lang B, go to for example the Site information page, switch the UI to Lang B and make changes. These changes will be differentiated from the Site information page of Lang A. This is a different concept from string translation and content translation. * * These are the basic variables for Drupal core, but you can add your own here. Find them, among others, by looking through source of page for name= */

$conf['i18n_variables'] = array( // Site information 'site_name', 'site_mail', 'site_slogan', 'site_mission', 'site_footer', 'anonymous', // File path 'file_directory_path', // Main menus 'menu_primary_links_source', 'menu_default_node_menu', // Contact form information 'site_frontpage', // Theme settings 'theme_default', // 'theme_settings', // not i18n compatible now // 'theme_garland_settings', // not i18n compatible now 'logo_path', 'contact_form_information', );

By the way, the code box is made with the drupal codefilter module.

Note1: For the incompatibility of the two escaped theme variables see: http://drupal.org/node/538954
Note2: "When setting the variables values for a language in the UI, you must first switch the site to that language in admin". This is a summary of http://drupal.org/node/313272#comment-1091779. I'm unclear as to what that means.

Finding and paying very close attention to this post: http://drupal.org/node/313272#comment-1105812 by bsimon cleared me up. I did not make changes to the default front page as suggested (that seemed a bit drastic), but the site slogan might do at first.

The multilingual variables, as I initially and inexplicably assumed, are not translated through Site building > Translation > Search (strings).

The translation of multilingual variables is done directly into, for example, the Site configuration > Site information - while you must be in the language that you are going to change.

Now that appears obvious, but the concept is opposite to how all other items are translated: the interface, the content, the menu's and the strings translations. I think this is what made me fail to grasp how it works, while it is, in fact, so simple. Just inconceivably unexpected.

To explain this in drupal terms, we are not "translating". We are adding content in the other language. While the effect is the same, here, the concept has been inverted.

But it works. And it's great that it does.