Merge pull request #17578 from liviuconcioiu/language

Fix PHP documentation links for Chinese (Simplified)
This commit is contained in:
Maurício Meneghini Fauth 2022-06-10 16:20:06 -03:00 committed by GitHub
commit a8cc5d93c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -162,7 +162,7 @@ class Core
/* List of PHP documentation translations */
$php_doc_languages = [
'pt_BR',
'zh',
'zh_CN',
'fr',
'de',
'ja',
@ -173,7 +173,11 @@ class Core
$lang = 'en';
if (isset($GLOBALS['lang']) && in_array($GLOBALS['lang'], $php_doc_languages)) {
$lang = $GLOBALS['lang'];
if ($GLOBALS['lang'] === 'zh_CN') {
$lang = 'zh';
} else {
$lang = $GLOBALS['lang'];
}
}
return self::linkURL('https://www.php.net/manual/' . $lang . '/' . $target);