Skip to content

Commit

Permalink
Merge pull request #1315 from m038/CS-5931-hack2
Browse files Browse the repository at this point in the history
CS-5931: connects symfony locale to legacy locale
  • Loading branch information
Paweł Mikołajczuk committed Jan 12, 2016
2 parents 35be712 + 91d23b5 commit bc9b61c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions newscoop/application/controllers/helpers/Smarty.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ public function preDispatch()

$request = $this->getRequest();

if ($request->getParam('language') == false) {
$locale = \Zend_Controller_Front::getInstance()->getParam('locale');
if (!empty($locale)) {
$request->setParam('language', $locale);
}
}

$format = $request->getParam('format', null);
if (isset($format) && $format == "json") {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public function indexAction(Request $request)
}

$front->setParam('bootstrap', $bootstrap);
$front->setParam('locale', $request->getLocale());
$front->setBaseUrl('/');
$response = $front->dispatch();

Expand Down

0 comments on commit bc9b61c

Please sign in to comment.