Hi there,
I'm trying to integrate the Locale module's functionality into my site but I'm observing some interesting behaviour which I wouldn't have expected. In fact, what I'm seeing may be intentional rather than a bug, but I'll explain anyway.
So, I have a site which consists of English and Japanese pages. The Locale module applies a 'jp' prefix to the start of Japanese node's paths.
However, when setting block visibility in accordance to path the prefix seems to be ignored. For example, if I want to only show a block on:
jp/something/something I have to specifiy just something/something for it to work rather than the whole path. Why is this?
This becomes more of a problem when I want to specify that a block should only appear on the home page of the Japanese content as the path 'jp' is simply ignored and the block doesn't appear.
Why isn't the entire path being considered, and how can I get around this problem and show blocks exclusively on the Japanese homepage?
Thanks, Richard
Comments
Comment #1
RichieRich commentedDoes anybody have any ideas? Put simply, do block visibility rules in terms of path ignore the prefix added by the locale module?
I'd like to do things like this to indicate that a block should be shown on all Japanese pages:
Show only on the listed pages:
ja
ja/*
...However, this doesn't work as the ja prefix is ignored. If I disable the Locale module and code the paths manually via the path alias, which is what I used to do, everything works fine.
Comment #2
RichieRich commentedSomebody must know something about this....should the prefix be being ignored by the block visibility settings?
Comment #3
gábor hojtsyYes, block visibility will consider the path after the locale module already stripped off the language. You shoud look into using i18n module for block language visibility.