Hello,
I've installed the i18n module without any problems. I have multilanguage nodes, interface with localization module, and can switch between 3 languages easily with the language block. However, I can't for the life of me figure out how to translate the site variables, such as "mission" and "phptemplate_primary_links".
Now in the INSTALL.txt file included with the module, the following is stated:
The list of variables to be made language dependent must be defined in the config file:
I.e.
$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',
// Theme settings: primary and secondary links, logo, etc..
'theme_settings',
// These are for PHPtemplate
'phptemplate_primary_links',
'phptemplate_primary_links_more',
'phptemplate_secondary_links',
'phptemplate_secondary_links_more',
);
These are only the suggested ones, but you can add as many Drupal variables as you want to the array.
You need to redefine these variables for the first time for every language, as previous values are lost and they return to defaults -they will be back if you disable i18n-. Errr, config file? Which config file? I don't see one in the package... and "defined"? So that means I just copy and paste that stuff into [whichever file it turns out we're talking about]? And then what?
You need to redefine these variables for the first time for every language
.
Ummm, what? :\
How / where do I define where the translations are supposed to go. IE, my site default is English... how do I define a "Spanish" and a "French" version of the mission?
Thanks,
s.
Comments
I have the same issue with primary links
And after making "about" page I can't translate it either.
I use english/bulgarian (it's cyrillic :)
----------
Working on a bilingual mini-portal - www.archeologic.net
You mean...
You can't translate the page itself, or the link to it?
The link
I think it's an issue with the URL alias. I guess. I still have not used the variables trick though.
----------
Working on a bilingual mini-portal - www.archeologic.net
You need to...
... copy the variables from install.txt into your settings.php file.
I have the locale module enabled, so now whenever I visit the settings page or the theme page, I can enter different settings based on what language I (admin) am currently working in; use the language selector block included with i18n to switch between them quickly.
Thank you in advance
I just have to copy the variables, the swith block is up and running for two days.
----------
Working on a bilingual mini-portal - www.archeologic.net
Localization and Other Places
For the phptemplate primary themes etc. . .just switch the locale on the settings page and you will have to re-enter the theme settings for your other language. So just view the site settings and theme pages in the various languages. You may want to check the untranslated strings afterward as well.
--------------------------------------------------------------
Personal Blog Site
Tried that...
Didn't work. I didn't add the variables in the config file though... is that why?
Which config file do I add the variables to, and does it matter where in that file?
Well ya. . .thats what the
Well ya. . .thats what the install file says. If you only have 1 site, there should only be 1 config file - the one where you set the db and base url variables before. Just add the i18n variables array to the end of that file.
--------------------------------------------------------------
Personal Blog Site
Ahhhh...
Much better. I didn't know that the "config" file referenced in the readme.txt was actually the site's settings.php file.
I added the variables in there as described in readme.txt. and edited each languages respective settings page. All seems to work now.
Thanks!
s.
NP
No problem. Ya that is a little confusing. . .perhaps submit a support request to have it changed. The previous versions of drupal had a conf file rather than settings.php.
--------------------------------------------------------------
Personal Blog Site
How big ... and some questions ...
Hi
actually I wonder how big could this array be, without slowing or disturbing the operation ... ?
Then, where do I find variables?
Can I define new variables by this method ?
Does this work for variables in modules as well ?
Thanks for response and this fine tools, drupal and i18n are.
Roland