You are here

function translation_get_links in Internationalization 5.2

Same name and namespace in other branches
  1. 5.3 translation/translation.module \translation_get_links()
  2. 5 translation/translation.module \translation_get_links()

Returns an array of links for all languages

Parameters

$path: Drupal internal path

$query: Query string

$names: Names to use for the links. Defaults to native language names

1 call to translation_get_links()
translation_block in translation/translation.module
Implementation of hook_block().

File

translation/translation.module, line 1195

Code

function translation_get_links($path = '', $query = NULL, $names = NULL) {
  $current = i18n_get_lang();
  $names = $names ? $names : i18n_languages('native');
  foreach (array_keys(i18n_supported_languages()) as $lang) {
    $url = translation_url($path, $lang);
    $links[] = theme('i18n_link', $names[$lang], i18n_path($url, $lang), $lang, $query);
  }
  return $links;
}