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