Hello,
I'm trying to write a module that'll change the theme based on the language of the site,
But I seem to run into a problem when trying to change theme.
I'm running this code:
function language_theme_init($may_cache) {
if(!$may_cache) {
global $custom_theme, $locale, $theme;
$theme = null;
$name = "garland";
$cusotm_theme = $name;
}
}
The theme doesn't change.
Anyone know what I'm doing wrong?
Idan
El Tue, 05 Feb 2008 14:59:45 +0300 Fred Jones fredthejonester@gmail.com escribió:
global $custom_theme, $locale, $theme;
$theme = null; $name = "garland"; $cusotm_theme = $name;Perhaps that last line should be:
$custom_theme = $name;
?
:D
You may also want to try i18n module: http://drupal.org/project/i18n
Cheers ________________________________
Marco Antonio Villegas Vega ( º - º ) Ing. Informatica http://blog.pucp.edu.pe/marvil07
Thanks, the typo did it...although I'm sure it was right before.... the i18n module doesn't have such a module...
Idan
-----Original Message----- From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Marco Antonio Villegas Vega Sent: Tuesday, February 05, 2008 3:42 PM To: support@drupal.org Subject: Re: [support] Trying to change theme, based on language
El Tue, 05 Feb 2008 14:59:45 +0300 Fred Jones fredthejonester@gmail.com escribió:
global $custom_theme, $locale, $theme;
$theme = null; $name = "garland"; $cusotm_theme = $name;Perhaps that last line should be:
$custom_theme = $name;
?
:D
You may also want to try i18n module: http://drupal.org/project/i18n
Cheers ________________________________
Marco Antonio Villegas Vega ( º - º ) Ing. Informatica http://blog.pucp.edu.pe/marvil07