Skip to content

Commit

Permalink
Update alternate way to select the language codes + trim in case of s…
Browse files Browse the repository at this point in the history
…paces in between languages
  • Loading branch information
jonmifsud committed Apr 3, 2012
1 parent 7d71eb1 commit 007474a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions extension.driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ public function initializeAdmin($context) {
$LOAD_NUMBER = 955935299;
$page = $context['parent']->Page;
$author = $context['parent']->Author;
$languages = explode(',', Symphony::Configuration()->get('languages', 'language_redirect') );
if (sizeof($languages)==0) $languages = explode(',', Symphony::Configuration()->get('language_codes', 'language_redirect') );
$codes = Symphony::Configuration()->get('languages', 'language_redirect');
if ($codes == '' || $codes == null) $codes = Symphony::Configuration()->get('language_codes', 'language_redirect');
$languages = array_map('trim',explode(',', $codes ));

$assets_path = URL . '/extensions/backend_language_switcher/assets';

// CSS & JS for all admin
Expand Down

0 comments on commit 007474a

Please sign in to comment.