I've been trying to display language-specific logos by adding the 'logo_path' variable to settings.php, as described here: http://drupal.org/node/313272
This setting appears to do something. If I look at the configuration page for any theme (or the default theme), then 'Path to custom logo' now includes the text 'This is a multilingual variable'.
But, despite this, it doesn't actually work for me. The same logo file is loaded for all languages - apparently whatever path/file I typed last. Basically it's still behaving as a single language setting.
Am I using the right variable name, 'logo_path'?
Is there some other way to get language-specific logos within i18n?
I found a couple of similar issues for D5: http://drupal.org/node/294693 and http://drupal.org/node/295468
I've tried this with various themes, including Garland, but that doesn't seem to make any difference.
There are some other modules that might handle this issue better than i18n, such as http://drupal.org/project/logotool or http://drupal.org/project/dynamic_logo - but I'm hoping to avoid bloating the installation, since i18n in D6 seems so close to being able to do it.
Comments
Comment #1
Jose Reyero CreditAttribution: Jose Reyero commentedTheme settings may work differently to regular variables, I've just added some notes here, http://drupal.org/node/313272
Let me know whether it is some help.
Comment #2
bsimon CreditAttribution: bsimon commentedOK, that appears to be working very well in beta5. All the new possibilities really expand the capabilities of i18n.
Thanks very much
+++++++++++++++++++++++++++
Details for anyone else who is trying to do this:
I'm using a standard copy of the Zen theme. Looking in the database (use PHPmyAdmin, for example), the variable name I need to use is 'theme_zen_settings',
It looks like many themes use this same format: theme_THEMENAME_settings
So I added 'theme_zen_settings', to settings.php, as described here http://drupal.org/node/313272
BTW, this probably doesn't work with older versions of i18n - e.g. it causes an SQL syntax error in 6.x-1.0-beta4
Comment #3
bsimon CreditAttribution: bsimon commentedset status active by mistake...
Comment #5
El Bandito CreditAttribution: El Bandito commentedTo clarify Bsimon's very useful clarification. You need to add both 'theme_XXXXXX_settings' AND 'logo_path' to your settings.php as described in http://drupal.org/node/313272 ( where XXXXXX is the themename in lowercase ). You can then switch languages on the themes settings page and enter a different logo path for each language. Job done.
Hope this helps.
Dave
Comment #6
rmmcclay CreditAttribution: rmmcclay commentedI would like to confirm that this works as Daves describes.
It's easy and logical.
Russ
Comment #7
Sinan Erdem CreditAttribution: Sinan Erdem commentedAfter entering paths for different logos, the logo change happens only after I visit theme settings page each time... Any ideas? Even clearing all caches won't work...
Comment #8
gyunei CreditAttribution: gyunei commentedI'm having a similar issue - can't seem to get the second language logo to work, and would be grateful for any advice you might have. Using 6.18, chameleon theme (although I have replicated the problem with garland) and english(default)/french setup.
I've followed the steps above, adding the multilingual variables 'logo_path' and 'theme_chameleon_settings'. In admin/build/theme/settings/chameleon, I am able to see "this is a multilingual variable" next to the path to custom logo field. When I change the path in the english interface, it registers fine, but specifying any path (even the same one) in the french interface makes the logo disappear (gone from the source code as well), even when I switch back to the default language. I can only make the logo reappear if I switch back to english and re-save. I've tried putting the logo images in different directories, but it doesn't seem to make a difference.
Suggestions?
Comment #9
abs CreditAttribution: abs commentedI have the same issue as gyunei on 6.19 with sub-theme of Zen and Czech / English setup.
I enable multilingual setup as suggested in earlier post. Then I switch to English which is seconadary language and navigate to Theme settings. After uploading or just setting path to english logo, logo disappears (from both languages). Back in Czech language and theme setting I can set the former logo back.
Any ideas?
Comment #10
70111m CreditAttribution: 70111m commentedSame issue as in the two previous comments by gyunei and abs. I checked the right variable name in the MySQL DB, which is 'theme_TheThemeName_settings' and added it with 'logo_path' to the settings.php. Other language variables ('site_frontpage') are working on my site, except this one...
EDIT:
There is a workaround i found here: http://drupal.org/node/295468#comment-978730
Surely not the way it should work, but it fixes the problem until a solution is found.
Comment #11
gandhiano CreditAttribution: gandhiano commentedI confirm this behavior (logo disappears after setting path for second language).
Workaround pointed out by #10 is a good tip and works perfectly, but of course, this problem should be properly fixed at some point.
Comment #12
kasiawaka CreditAttribution: kasiawaka commentedThis is a solution that worked for me: http://drupal.org/node/313272#comment-4039288
It requires to use different values in settings.php then described in different documentation.
Hope that helps
Comment #13
GiorgosKas per http://drupal.org/node/313272#comment-4039288
you should not add logo_path or theme_settings
because when entering logo of second language both logos dissapear
problem is that "This is a multilingual variable" does not appear below the variable and its confusing
thus this is still a valid issue that needs addressing
EDIT: spoke too soon seems that it does not work with subtheme of fusion
EDIT2: I ended up using
Comment #14
BenasPlentas CreditAttribution: BenasPlentas commented@GiorgosK - could you tell me where exactly you place this code from #13?
Comment #15
GiorgosKIn your theme's template.php file
Comment #16
Jose Reyero CreditAttribution: Jose Reyero commentedFeel free to add your solutions to the module's documentation pages.
Comment #17
bludrop CreditAttribution: bludrop commentedI18n Logo module seems to have "fixed" this problem: http://drupal.org/project/i18nlogo
Comment #18
silver157 CreditAttribution: silver157 commented#13
is this code work with ver 7.x ?
Comment #19
fanton#18
in D7: