Hi.

I´ve making a multilanguage site. When I active footermap to see the principal menu I see the sitemap, but it shows the links of all languages, not only the current one, i mean, its translations too.

It seems the Footermap block does not filter by language.

Thanks for the module.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

luckystrikerin’s picture

subscribing

mradcliffe’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Assigned: Unassigned » mradcliffe
Category: bug » feature

I guess I should take a look at this again for Drupal 7. It was a bit out of scope for Drupal 6, but I will investigate again. #663960: Current language ignored in output at l18n site

mradcliffe’s picture

The only way I see to implement this is to generate several renders per language, cache, and then use based on the current user's language.

I'll see what I can do when I have time... The i18n module is fairly difficult to use.

criscom’s picture

subscribe

quazardous’s picture

subscribe 6.x has the same pb

metakel’s picture

I use a few languages on my sites and all languages' menu items were shown under the footermap, rendering this wonderful module useless on mine... :(

Hope that you can come out with the i18n version soon!

giginos’s picture

I've added a quick solution to get the footermap work for multilang-pages. Hope this helps to add this feature to the next version:

#1 Add to footermap.module, method footermap_get_menu:

add '#language' => $item->language

#2 Add in footermap.tpl.php:

function UI_lang() {
	global $language;
	return $language->language;
  }
  
  foreach($header as $headerkey => $menustack) {
	if(is_array($menustack)) {
		foreach($menustack as $menustackkey => $menucat) {
			foreach($menucat as $menusettingskey => $menusetting) {
				if($menusettingskey == '#language' && $menusetting !=  UI_lang()) {
					unset($header[$headerkey][$menustackkey]);
				}
			}
		}
	}
  }
mradcliffe’s picture

Status: Active » Needs review
FileSize
4.33 KB

Thank you for your work. I have incorporated the basic idea into footermap.module and footermap.theme.inc with some changes.

We really shouldn't be defining functions in the template, but most of the logic can be used in template_preprocess_footermap().

I also need to change the caching from per_role to custom caching (again). This probably needs some further testing.

Instructions:

git clone git.drupal.org:/project/footermap.git
cd footermap
git am 0001-1065732-by-mradcliffe-giginos-i18n-friendly.patch
drush cc all
mradcliffe’s picture

Status: Needs review » Fixed

Committing this.

Status: Fixed » Closed (fixed)
Issue tags: -i18n, -internationalization

Automatically closed -- issue fixed for 2 weeks with no activity.