function i18n_get_links in Internationalization 5.3
Same name and namespace in other branches
- 5 i18n.module \i18n_get_links()
- 5.2 i18n.module \i18n_get_links()
Function i18n_get_links
Returns an array of links for all languages, with or without names/flags
Parameters
$path: Drupal internal path
$query: Query string
$names: Names to use for the links. Defaults to native language names
1 call to i18n_get_links()
- i18n_block in ./
i18n.module - Language block
File
- ./
i18n.module, line 607 - Internationalization (i18n) module
Code
function i18n_get_links($path = '', $query = NULL, $names = NULL) {
if ($path == i18n_frontpage()) {
$path = '';
}
$names = $names ? $names : i18n_languages('native');
foreach (array_keys(i18n_supported_languages()) as $lang) {
$links[$lang] = theme('i18n_link', $names[$lang], i18n_path($path, $lang), $lang, $query);
}
return $links;
}