Skip to content

Commit

Permalink
Bug: 12985 Fix determination of language filename.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Rubinsky committed Feb 25, 2014
1 parent a7f55ad commit 9a1d9a2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions framework/Core/lib/Horde/Core/HordeMap.php
Expand Up @@ -38,6 +38,12 @@ static public function init(array $params = array())
{
global $browser, $conf, $language, $page_output, $registry;

// Language specific file needed?
$language = str_replace('_', '-', $language);
if (!file_exists($registry->get('jsfs', 'horde') . '/map/lang/' . $language . '.js')) {
$language = 'en-US';
}

$params = array_merge(array(
'conf' => array(
'language' => $language,
Expand All @@ -52,12 +58,6 @@ static public function init(array $params = array())
'ssl' => $browser->usingSSLConnection(),
), $params);

// Language specific file needed?
$language = str_replace('_', '-', $language);
if (!file_exists($registry->get('jsfs', 'horde') . '/map/lang/' . $language . '.js')) {
$language = 'en-US';
}

foreach ($params['providers'] as $layer) {
switch ($layer) {
case 'Google':
Expand Down

0 comments on commit 9a1d9a2

Please sign in to comment.