Hello,
I'm using i18n for 4.6 multilingual site. I've installed taxonomy_theme to assign different themes for different languages depending on paths. The single path assignment is working fine, like en/about gets the "bluemarine_en" theme as I want.
My problem is that the wild card * doesn't work to assign a theme for an entire language like en/* ! I have to assign every single node, and the dynamically generated content can't get the appropriate theme (i.e. events/2007/07/07 gets the default theme, both under en/ and fr/)!
Is there any work around?
P.S. The site is currently in a subdirectory, but will be moved soon to the root folder.
Comments
Comment #1
profix898 commentedWow. I cant recall how the code was for the 4.6 version of taxonomy_theme. As I'm quite busy atm it may take a day or two to install a test environment and figure out ...
Comment #2
wissam78 commentedThat would be nice...
By the way, the patch:
if (module_exist('i18n')) {
i18n_get_lang_prefix($alias_uri, true);
}
doesn't exist in v.1.6.2.13!
However, it didn't make change when I added it!
Thanx
Comment #3
profix898 commentedI just tried to install Drupal 4.6 and all I get is a malformed page (see attached screenshot). I guess D4.6 does not work correctly with my recent server configuration (Apache, PHP, MySQL version). But I dont intend to spend more time with a deprecated Drupal version to investigate why it doesnt work.
However you should try to print out the $alias_uri variable and see if it contains the language prefix, e.g. 'en/...'. If neither $uri not $alias_uri are prepended by the prefix there is no easy way for path-based theme switching for your case. You'd need to use a i18n function like i18n_get_lang() (not sure what it was called in 4.6) to get the language then and switch the theme based on that ...
Comment #4
profix898 commentedscreenie
Comment #5
sally2006 commentedHello,
I had this problem in my site too, and it was solved by this change in file : taxonomy_theme_paths
I added this line to source
if (preg_grep($paths_regexp, array($uri, $alias_uri))) {
$custom_theme = $themex->name;
if (module_exists('i18n') && module_invoke('i18n', 'language_rtl'))
$custom_theme = rtl.$themex->name;
}
after that I added a new theme with name " rtlthemename "
now you can use en/* in taxonomy_theme module .
Comment #6
profix898 commented