Locale folders inside its own modules

This commit is contained in:
Juan Ferrer Toribio 2016-10-27 13:30:32 +02:00
parent 73ba247268
commit 9bdd604038
2 changed files with 3 additions and 2 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
php-vn-lib (1.306-deb8) stable; urgency=low php-vn-lib (1.307-deb8) stable; urgency=low
* Initial Release. * Initial Release.

View File

@ -88,7 +88,8 @@ namespace Vn\Lib
**/ **/
static function loadFile ($path) static function loadFile ($path)
{ {
$file = stream_resolve_include_path ('locale/'. self::$locale .'/'. $path .'.json'); $locale = self::$locale;
$file = stream_resolve_include_path ("$path/locale/$locale.json");
if (file_exists ($file) if (file_exists ($file)
&& ($jsonString = file_get_contents ($file))) && ($jsonString = file_get_contents ($file)))