Skip to content

Commit

Permalink
[FrameworkBundle] Initialize translator with the default locale.
Browse files Browse the repository at this point in the history
  • Loading branch information
aitboudad committed Apr 16, 2015
1 parent 7b2873f commit a0d185a
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -57,7 +57,7 @@ public function __construct(ContainerInterface $container, MessageSelector $sele

$this->options = array_merge($this->options, $options);

parent::__construct(null, $selector, $this->options['cache_dir'], $this->options['debug']);
parent::__construct($container->getParameter('kernel.default_locale'), $selector, $this->options['cache_dir'], $this->options['debug']);
}

/**
Expand Down

3 comments on commit a0d185a

@rvanlaak
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if my default locale is determined based on the Request URI? Will it fail when null is set as default?

@aitboudad
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can still set null value as default

@rvanlaak
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.