views:

167

answers:

2

i want to add multilingual feature for slogan and mission in the drupal site information.

I tried adding:

$conf['i18n_variables'] = array (
   'site_name',
   'site_slogan',
   'site_mission',
   'site_footer',
   'anonymous'
);

to settings.php, but that is not working. I am using drupal 6.17

+1  A: 

Any text that is ran trough t() is translatable.

E.g. the code in your theme:

<title><?php print "my title"; ?></title>

is not translatable, while

<title><?php print t("my title"); ?></title>

is ran trough the translation system.

For any string that is ran trough the t() function Drupal allows several ways of overriding them. Almost all Drupal core interface strings are ran trough the translation interface. With exceptions for any user-inputted data (manually added menu-items, site-slogans, titles etceteras).

To override, you can use the on-site interface in admin (admin > site building > localisation) or use the method you describe, to hardcode them in the settings.php. You should try to avoid the latter on a fully multilingual site. That method is only meant to be used if you don't want to enable the entire translation interface just to change one or two strings.

But to start at the beginning: you should make sure the string is translatable at all. Only then can you change this on a per-language base.

If, in addition to the core -t()-ed strings you want to translate user-inputted strings, you will need the i18n module. A large module, but it allows to translate things such as the slogan and site title.

berkes
A: 

Adding site_slogan and site_missiong to $conf['i18n_variables'] should work if you have installed (and enabled) the Internationalization module. Once it's done, you should be able to set values for each languages by visiting the Site information administration page with the interface set in the language you want to edit the values for (ie. to edit the values in French, you should go to http://example.com/?q=fr/admin/settings/site-information) as documented on the "Multilingual Variables" of the module's handbook.

2010/06/21: Added Internationalization requirements and link to handbook page.

mongolito404
i did the same thing, but it is not working :(
viMaL