mirror of
https://github.com/scummvm/scummvm-web.git
synced 2026-06-20 05:45:49 +00:00
WEB: Load localized data in models
This commit is contained in:
1 parent
34dbf61a23
commit
08fffe6dd0
11 files changed
+32
-28
No files matched your search
@@ -19,22 +19,7 @@ class FAQModel extends BasicModel
|
||||
/* Get the full path and filename for the F.A.Q. XML-file. */
|
||||
public function getFilename()
|
||||
{
|
||||
global $lang;
|
||||
|
||||
if ($lang !== DEFAULT_LOCALE) {
|
||||
$localized = DIR_DATA . "/faq-xml." . $lang . ".xml";
|
||||
|
||||
if (is_file($localized)) {
|
||||
if (!is_readable($localized)) {
|
||||
$file = "\n\nFilename: " . basename($localized) . "\n";
|
||||
throw new \ErrorException(self::FILE_NOT_FOUND . $file);
|
||||
} else {
|
||||
return $localized;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return DIR_DATA . '/faq-xml.xml';
|
||||
return $this->getLocalizedFile('faq.xml');
|
||||
}
|
||||
|
||||
/* Get last modification time. */
|
||||
|
||||
Reference in new issue
Block a user