Fix multilang
This commit is contained in:
parent
2d841d9d83
commit
2205667ca0
@ -1412,7 +1412,7 @@ class Website extends CommonObject
|
|||||||
$countrycode = strtolower(substr($languagecodeselected, -2));
|
$countrycode = strtolower(substr($languagecodeselected, -2));
|
||||||
$label = $weblangs->trans("Language_".$languagecodeselected);
|
$label = $weblangs->trans("Language_".$languagecodeselected);
|
||||||
if ($countrycode == 'us') $label = preg_replace('/\s*\(.*\)/', '', $label);
|
if ($countrycode == 'us') $label = preg_replace('/\s*\(.*\)/', '', $label);
|
||||||
$out .= '<a href="'.$url.$languagecodeselected.'"><li><img height="12px" src="medias/image/common/flags/'.$countrycode.'.png" style="margin-right: 5px;"/>'.$label;
|
$out .= '<a href="'.$url.substr($languagecodeselected, 0, 2).'"><li><img height="12px" src="medias/image/common/flags/'.$countrycode.'.png" style="margin-right: 5px;"/>'.$label;
|
||||||
$out .= '<span class="fa fa-caret-down" style="padding-left: 5px;" />';
|
$out .= '<span class="fa fa-caret-down" style="padding-left: 5px;" />';
|
||||||
$out .= '</li></a>';
|
$out .= '</li></a>';
|
||||||
}
|
}
|
||||||
@ -1431,7 +1431,7 @@ class Website extends CommonObject
|
|||||||
$countrycode = strtolower(substr($languagecode, -2));
|
$countrycode = strtolower(substr($languagecode, -2));
|
||||||
$label = $weblangs->trans("Language_".$languagecode);
|
$label = $weblangs->trans("Language_".$languagecode);
|
||||||
if ($countrycode == 'us') $label = preg_replace('/\s*\(.*\)/', '', $label);
|
if ($countrycode == 'us') $label = preg_replace('/\s*\(.*\)/', '', $label);
|
||||||
$out .= '<a href="'.$url.$languagecode.'"><li><img height="12px" src="medias/image/common/flags/'.$countrycode.'.png" style="margin-right: 5px;"/>'.$label;
|
$out .= '<a href="'.$url.substr($languagecode, 0, 2).'"><li><img height="12px" src="medias/image/common/flags/'.$countrycode.'.png" style="margin-right: 5px;"/>'.$label;
|
||||||
if (empty($i) && empty($languagecodeselected)) $out .= '<span class="fa fa-caret-down" style="padding-left: 5px;" />';
|
if (empty($i) && empty($languagecodeselected)) $out .= '<span class="fa fa-caret-down" style="padding-left: 5px;" />';
|
||||||
$out .= '</li></a>';
|
$out .= '</li></a>';
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user