forked from verdnatura/hedera-web
Locale hotfix
This commit is contained in:
parent
aaa4db25cd
commit
058493124b
|
@ -1,4 +1,4 @@
|
|||
hedera-web (1.385-deb8) stable; urgency=low
|
||||
hedera-web (1.387-deb8) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ module.exports =
|
|||
,loadScript: function (path, callback)
|
||||
{
|
||||
this.init ();
|
||||
Vn.includeJs ('locale/'+ this.language +'/'+ path, callback);
|
||||
Vn.includeJs (path +'/locale/'+ this.language, callback);
|
||||
}
|
||||
|
||||
,loadDone: function (request, callback)
|
||||
|
|
|
@ -103,10 +103,10 @@ class HtmlService extends Service
|
|||
|
||||
function getUrl ($fileName)
|
||||
{
|
||||
if (file_exists ($fileName))
|
||||
/* if (file_exists ($fileName))
|
||||
$mTime = '?'. strftime ('%G%m%d%H%M%S', filemtime ($fileName));
|
||||
else
|
||||
$mTime = '?'. $this->getVersion ();
|
||||
*/ $mTime = '?'. $this->getVersion ();
|
||||
|
||||
return $fileName.$mTime;
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ abstract class Service
|
|||
preg_match_all ($regexp, $_SERVER['HTTP_ACCEPT_LANGUAGE'], $languages);
|
||||
|
||||
foreach ($languages[1] as $lang)
|
||||
if (stream_resolve_include_path ("locale/$lang"))
|
||||
if (TRUE || stream_resolve_include_path ("locale/$lang"))
|
||||
{
|
||||
$_SESSION['lang'] = $lang;
|
||||
break;
|
||||
|
@ -74,7 +74,7 @@ abstract class Service
|
|||
|
||||
if (!isset ($_SESSION['lang']))
|
||||
$_SESSION['lang'] = NULL;
|
||||
|
||||
|
||||
Locale::set ($_SESSION['lang']);
|
||||
Locale::addPath ('vn/web');
|
||||
|
||||
|
|
Loading…
Reference in New Issue