@@ 223-229 (lines=7) @@ | ||
220 | foreach ($locales as $locale) { |
|
221 | $fullPath = $xoops->path("{$path}/locale/{$locale}/locale.php"); |
|
222 | $fullPath2 = $xoops->path("{$path}/locale/{$locale}/{$locale}.php"); |
|
223 | if (\XoopsLoad::fileExists($fullPath)) { |
|
224 | \XoopsLoad::addMap(array($domain . 'locale' => $fullPath)); |
|
225 | if (\XoopsLoad::fileExists($fullPath2)) { |
|
226 | \XoopsLoad::addMap(array(strtolower($domain . "locale{$locale}") => $fullPath2)); |
|
227 | } |
|
228 | return true; |
|
229 | } |
|
230 | } |
|
231 | return false; |
|
232 | } |
|
@@ 248-254 (lines=7) @@ | ||
245 | foreach ($locales as $locale) { |
|
246 | $fullPath = $xoops->path($theme->resourcePath("locale/{$locale}/locale.php")); |
|
247 | $fullPath2 = $xoops->path($theme->resourcePath("locale/{$locale}/{$locale}.php")); |
|
248 | if (\XoopsLoad::fileExists($fullPath)) { |
|
249 | \XoopsLoad::addMap(array(strtolower($theme->folderName . 'ThemeLocale') => $fullPath)); |
|
250 | if (\XoopsLoad::fileExists($fullPath2)) { |
|
251 | \XoopsLoad::addMap(array(strtolower($theme->folderName . "ThemeLocale{$locale}") => $fullPath2)); |
|
252 | } |
|
253 | return true; |
|
254 | } |
|
255 | } |
|
256 | return false; |
|
257 | } |