| @@ 1058-1062 (lines=5) @@ | ||
| 1055 | ||
| 1056 | $language = empty($language) ? XoopsLocale::getLegacyLanguage() : $language; |
|
| 1057 | // expanded domain to multiple categories, e.g. module:Fsystem, framework:filter, etc. |
|
| 1058 | if ((empty($domain) || 'global' === $domain)) { |
|
| 1059 | $path = ''; |
|
| 1060 | } else { |
|
| 1061 | $path = (is_array($domain)) ? array_shift($domain) . '/' : "modules/{$domain}/"; |
|
| 1062 | } |
|
| 1063 | $path .= 'language'; |
|
| 1064 | ||
| 1065 | if (!XoopsLoad::fileExists($file = $this->path("{$path}/{$language}/{$name}.php"))) { |
|
| @@ 170-174 (lines=5) @@ | ||
| 167 | } |
|
| 168 | $language = empty($language) ? \XoopsLocale::getLegacyLanguage() : $language; |
|
| 169 | // expanded domain to multiple categories, e.g. module:system, framework:filter, etc. |
|
| 170 | if ((empty($domain) || 'global' === $domain)) { |
|
| 171 | $path = ''; |
|
| 172 | } else { |
|
| 173 | $path = (is_array($domain)) ? array_shift($domain) : "modules/{$domain}"; |
|
| 174 | } |
|
| 175 | $xoops = \Xoops::getInstance(); |
|
| 176 | $fullPath = $xoops->path("{$path}/language/{$language}/{$name}.php"); |
|
| 177 | if (!$ret = \XoopsLoad::loadFile($fullPath)) { |
|
| @@ 194-199 (lines=6) @@ | ||
| 191 | { |
|
| 192 | $xoops = \Xoops::getInstance(); |
|
| 193 | // expanded domain to multiple categories, e.g. module:system, framework:filter, etc. |
|
| 194 | if ($domain === null) { |
|
| 195 | $path = ''; |
|
| 196 | $domain = 'xoops'; |
|
| 197 | } else { |
|
| 198 | $path = (is_array($domain)) ? array_shift($domain) : "modules/{$domain}"; |
|
| 199 | } |
|
| 200 | if (null !== $forcedLocale) { |
|
| 201 | try { |
|
| 202 | Data::setDefaultLocale($locale); |
|