By mak dara on
Hello All, My website use drupal 4.6 and have 2 language. but i have problem with display block in each language. When i want to display block by language, it does not display "I type url en/* or km/* in box that i want to display". I don't know why. If everybody know please share with me.
Thant an advance
Comments
Problem with display block by language (en/*, km/*)
Hello Dara,
Please go to check changelog-local.txt in the drupal4.6 directory then you will see the instruction about this problem, just copy that code and past in block.module.
=======================================
Here is a workaround/hack for 4.6.0 to define separate user menus, one for each language. Then have them switch off and on using adminster->blocks->configure (a menu block)->"Page specific visibility settings". Use en/* to keep an es menu from showing on the en pages, and vice versa.
Look in block.module, around line number 470 for this existing code:
// Match path if necessary
if ($block['pages']) {
$path = drupal_get_path_alias($_GET['q']);
then add the following below it:
// if a language is enabled, prepend it to the path
// This will allow blocked page specs to match on language
$lang = i18n_get_lang($name);
if (strlen($lang) > 0) {
$path = $lang . '/' . $path;
}
I have no idea yet what side effects this may create, just got it to work, but the menus are switching nicely. YMMV
=====================================
Let me know if it works,
Thanks,
Best,
Hy ChanHan