allow to specify the root for lang-files

This commit is contained in:
Ralf Becker 2020-02-01 17:50:38 +01:00
parent 6a64128893
commit abd6f7d669

View File

@ -783,10 +783,11 @@ class Translation
* @param string $lang language code
* @return the full path of the filename for the requested app and language
*/
static function get_lang_file($app,$lang)
static function get_lang_file($app,$lang,$root=EGW_SERVER_ROOT)
{
if ($app == 'common') $app = 'phpgwapi';
return EGW_SERVER_ROOT.'/'.$app.'/'.self::LANG_DIR.'/'.self::LANGFILE_PREFIX.$lang.self::LANGFILE_EXTENSION;
if ($app == 'common') $app = 'api';
return $root.'/'.$app.'/'.self::LANG_DIR.'/'.self::LANGFILE_PREFIX.$lang.self::LANGFILE_EXTENSION;
}
/**