Skip to content
Snippets Groups Projects
Commit 30285062 authored by Jared Hancock's avatar Jared Hancock
Browse files

i18n: Fixup header and footer language hints

parent 5ecaacf3
No related branches found
No related tags found
No related merge requests found
......@@ -85,11 +85,14 @@ if (($lang = Internationalization::getCurrentLanguage())
if (($all_langs = Internationalization::getConfiguredSystemLanguages())
&& (count($all_langs) > 1)
) {
$qs = array();
parse_str($_SERVER['QUERY_STRING'], $qs);
foreach ($all_langs as $code=>$info) {
list($lang, $locale) = explode('_', $code);
$qs['lang'] = $code;
?>
<a class="flag flag-<?php echo strtolower($locale ?: $info['flag'] ?: $lang); ?>"
href="?<?php echo urlencode($_GET['QUERY_STRING']); ?>&amp;lang=<?php echo $code;
href="?<?php echo http_build_query($qs);
?>" title="<?php echo Internationalization::getLanguageDescription($code); ?>">&nbsp;</a>
<?php }
} ?>
......
......@@ -51,7 +51,9 @@ if ($.support.pjax) {
}
</script>
<?php
if ($thisstaff && $thisstaff->getLanguage() != 'en_US') { ?>
if ($thisstaff
&& ($lang = $thisstaff->getLanguage())
&& 0 !== strcasecmp($lang, 'en_US')) { ?>
<script type="text/javascript" src="ajax.php/i18n/<?php
echo $thisstaff->getLanguage(); ?>/js"></script>
<?php } ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment