This topic contains 2 replies, has 3 voices, and was last updated by Yurii Muratov 8 years, 7 months ago.
- Topic
Hi
after updating the platform to 1.8.0 the translations of my custom bundles are not loaded.
As temporary solution i’ve created the listener that sets the right locale.
It looks like this:1234567891011121314151617181920212223242526272829303132333435class LocaleListener implements EventSubscriberInterface{private $defaultLocale;public function __construct($defaultLocale = 'en'){$this->defaultLocale = $defaultLocale;}public function onKernelRequest(GetResponseEvent $event){$request = $event->getRequest();if (!$request->hasPreviousSession()) {return;}if ($locale = $request->attributes->get('_locale')) {$request->getSession()->set('_locale', $locale);} else {$request->setLocale($request->getSession()->get('_locale', $this->defaultLocale));}}public static function getSubscribedEvents(){return array(KernelEvents::REQUEST => array(array('onKernelRequest', 20)),);}}But still not all the translation are loaded/used in time.
What could cause the problem ?
The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.