diff --git a/common.php b/common.php index 21e9a21..ad6729f 100755 --- a/common.php +++ b/common.php @@ -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) diff --git a/libary.php b/libary.php index 81967ce..1f1598a 100755 --- a/libary.php +++ b/libary.php @@ -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"]))

- '. printDescription($description, "en") .' + '. printDescription($description, $defaultLocale) .'