Last updated September 25, 2008. Created by Jose Reyero on April 5, 2007.
Edited by add1sun, Ian Ward. Log in to edit this page.
Some text and settings are stored in Drupal as variables, and some site wide ones like 'site name' and 'site slogan,' along with module specific ones, can be edited through the administration pages. The Internationalization module makes it so these variables can be translatable.
To enable these variables to be translatable we need to identify the low level names Drupal uses for them. This can be done looking at the 'variable' table in the database or searching through the code. However, we'll show you how to translate the more common setting below.
Once you have identified the variables you want to be translated, they need to be added in the settings file as follows:
/** * Multilingual settings * * This is a collection of variables that can be set up for each language when i18n enabled. * These are the basic ones for Drupal core, but you can add your own here. */ $conf['i18n_variables'] = array( 'site_name', 'site_slogan', 'site_mission', 'site_footer', 'anonymous', 'menu_primary_menu', 'menu_secondary_menu', );
The configuration file is usually under /sites/default/settings.php or another subfolder depending on the settings of your site. Also there may be more than one if you are using a multi-site set up.
Once you have the correct settings added to your configuration file, they'll be marked as 'multilingual variable' when you go to the corresponding administration pages. You must switch the site language while in the administration pages to set the value for each language

Comments
multilingual variable for contact form
If you are using the contact form, add this variable to settings.php as well:
'contact_form_information',This will enable you to change the "You can leave a message…" line on the contact form into other languages.
As mentioned above, you must switch the site language while in the administration pages to set the value for each language. In other words, you must switch site language while you are on admin->site building->contact form under the settings tab before saving the sentence in each language.
Multilingual frontpages
If you are using different nodes/paths for different languages and you want to use these as your frontpages, you need to make
'site_frontpage'a multilingual variable so that you can specify different frontpages per language in /admin/settings/site-information (by switching language once in that page, as usual).
git documentation | How to make & apply a patch | Adding a commit author
Re: Multilingual frontpages
Did you really get this to work? See this thread where we're all finding that i18n doesn't seem to support site_frontpage properly.
http://drupal.org/node/249694
_
-comment added in wrong spot. Please delete.
Can't translate contact page title/heading
Hi,
I can't seem to properly translate the Contact Form page title "Contact Us", which doesn't appear to be in the variables table.
I have links to the contact form for each language's secondary links menu but for some reason, when I'm in English mode, the contact page title is in the other language. The page title is always in the other language despite the language mode. Has anybody encountered this issue and have any suggestions for solving it? Thanks.
Find out variables that can be used as multilingual variables
First things first, I'm using:
- Drupal: 5.7
- MySQL database: 5.0.67
- PHP: 5.2.6-0.dotdeb.1
- Mysite module: 5.x-3.3
I would like to create multilingual variables for mysite page information like:
- MySite Sitename
- Personal Page Title
- Et cetera
Does anyone know how to create these?
Or, more in general:
how to find out the names of variables that can be used as multilingual variables?
Thnx,
Marc
___________________
discover new oceans
lose sight of the shore
___________________
discover new oceans
lose sight of the shore
Check variable table
Hmm, this seems to be easier than I thought it would be...
Just a matter of checking the variable table ;)
So forget my question above...
___________________
discover new oceans
lose sight of the shore
___________________
discover new oceans
lose sight of the shore
Where is the complete
Where is the complete variable table? Been looking in all the readme.txt files without success, can't find it with google either... thanks
Table "variable" in database
To find the variable table, you need access to the Drupal database.
To access you need user/password (from your provider)
and you can use tools like:
- phpmyadmin
- sqlyog
- sql buddy
Once in the database, there's a table "variable".
___________________
discover new oceans
lose sight of the shore
OK thanks, got there with
OK thanks, got there with phpmyadmin, very interesting
If you have devel module
If you have devel module installed [http://drupal.org/project/devel] , go to "/devel/variable"
www.fagioli.biz
any module that does this?
I got it working too! Thanx people for sharing the info.
Is there any module that does this without users having to fiddle with their settings.php files? Is there at least any issue in the i18n module for this?
Clear drupal *and* browser
Clear drupal *and* browser caches for this to work.