diff --git a/modx.ddtools.class.php b/modx.ddtools.class.php index e55975f..565a533 100644 --- a/modx.ddtools.class.php +++ b/modx.ddtools.class.php @@ -1638,6 +1638,16 @@ public static function getResponse($version = null){ return $output; } + public static function extendLanguage($path = '', $language = "") { + global $manager_language, $_lang; + if (!$path) $path = dirname(__FILE__); + $path = MODX_BASE_PATH.str_replace(MODX_BASE_PATH,'',$path); + if (!$language) $language = $manager_language; + include_once("{$path}lang/english.inc.php"); +if ($language !== 'english' && is_file("{$path}lang/{$language}.inc.php")) { + include_once("{$path}lang/{$language}.inc.php"); + } + } } if(isset($modx)){