Drupal 7 i18n: How to remove i18n translation links in content ('translation-link') footer.

Drupal 7 i18n: How to remove i18n translation links in content ('translation-link') footer.

In the current Drupal 7 i18n translation modules there's a problem with removing the content translation links at the bottom of content.

I've created a little snippet for the template.php file based on the #29 issue comment here.

I hope it will help you:

  1. /**
  2. * Remove translation links.
  3. */
  4. function THEME_links($variables) {
  5.   $links = $variables['links'];
  6.   foreach ($links as $key => $value) {
  7.     if (isset($value['attributes']) && $value['attributes']['class'][0] == 'translation-link') {
  8.       unset($variables['links'][$key]);
  9.     }
  10.   }
  11.   return theme_links($variables);
  12. }

Kommentare

neither the css approach nor ...

... this code snippet helps me out.

I tried to manipulate both; template.php in the main and the child theme... The boring language switcher are still present.

Hope to see a module solution soon.

Thanks for this approach !

Best
Sascha

Hey Sascha, did you replace

Hey Sascha, did you replace THEME with your theme name?

jepp

Thank you, Julian.

Yes, however, still see the disturbing language hints below nodes and above "webforms"
Tried both, THEME replaced with theme and sub_theme name

Best
Sascha

Be sure to clear the cache

Be sure to clear the cache after the change. I'm using it in my template.php without problems.

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.

Weitere Informationen über Formatierungsoptionen