You are here

function language_access_link_alter in Language access 6

File

./language_access.module, line 64

Code

function language_access_link_alter(&$links, $node, $comment = NULL) {
  $languages = language_list('enabled');
  foreach ($languages[1] as $language) {
    if (!user_access('access language ' . $language->language)) {
      if (isset($links['node_translation_' . $language->language])) {
        unset($links['node_translation_' . $language->language]);
      }
    }
  }
}