forked from Li/psmreborn
Make use default locale
This commit is contained in:
parent
a626623ecc
commit
85475b7d92
|
@ -112,7 +112,9 @@ function getLatestVer(string $game){
|
|||
function getDesc(string $game){
|
||||
$version = getLatestVer($game);
|
||||
$mdxml = simplexml_load_file('gameinfo/' . $game . "/".$version."/metadata.xml", 'SimpleXMLElement', LIBXML_NOENT);
|
||||
return printDescription($mdxml->localizedMetadataList->children(), "en");
|
||||
|
||||
$defaultLocale = (string)$mdxml->localizedMetadataList->attributes()->default_locale;
|
||||
return printDescription($mdxml->localizedMetadataList->children(), $defaultLocale);
|
||||
}
|
||||
|
||||
function getTitle(string $game)
|
||||
|
|
|
@ -59,6 +59,9 @@ if(isset($_GET["game"]))
|
|||
$metadataXML = simplexml_load_file('gameinfo/' . $game . "/". $latestVersion ."/metadata.xml", 'SimpleXMLElement', LIBXML_NOENT);
|
||||
$description = $metadataXML->localizedMetadataList->children();
|
||||
$screenshot = $metadataXML->screenShotList->screenShot;
|
||||
|
||||
$defaultLocale = (string)$mdxml->localizedMetadataList->attributes()->default_locale;
|
||||
|
||||
$isplayable = "";
|
||||
|
||||
if($zrifinfo == "MISSING" && $zrifPendingInfo == "MISSING")
|
||||
|
@ -106,7 +109,7 @@ if(isset($_GET["game"]))
|
|||
|
||||
<div id="psm-description">
|
||||
<hr>
|
||||
'. printDescription($description, "en") .'
|
||||
'. printDescription($description, $defaultLocale) .'
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user