Skip to content

Commit

Permalink
fix locale
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentin committed Jun 29, 2015
1 parent eda6c5f commit 84f9bce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Router/I18nRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ private function matchI18n(array $params, $url)
$params['_route'] = substr($params['_route'], $pos + strlen(I18nLoader::ROUTING_PREFIX));
}

foreach($this->hostMap as $locale => $host) {
if ($host == $this->context->getHost()) {
$this->context->setParameter('_locale', $locale);
}
}

if (!($currentLocale = $this->context->getParameter('_locale'))
&& $this->container->isScopeActive('request')) {
$currentLocale = $this->localeResolver->resolveLocale(
Expand Down

0 comments on commit 84f9bce

Please sign in to comment.