Switch to symfony/translation for translations (#250)

This commit is contained in:
Pierre Rudloff 2019-11-27 23:15:49 +01:00
parent 0b1ce90f47
commit a5bd827d21
16 changed files with 399 additions and 212 deletions

View file

@ -7,6 +7,7 @@
namespace Alltube\Controller;
use Alltube\Config;
use Alltube\LocaleManager;
use Alltube\SessionManager;
use Alltube\Video;
use Aura\Session\Segment;
@ -53,6 +54,13 @@ abstract class BaseController
*/
protected $sessionSegment;
/**
* LocaleManager instance.
*
* @var LocaleManager
*/
protected $localeManager;
/**
* BaseController constructor.
*
@ -64,6 +72,7 @@ abstract class BaseController
$this->container = $container;
$session = SessionManager::getSession();
$this->sessionSegment = $session->getSegment(self::class);
$this->localeManager = $this->container->get('locale');
if ($this->config->stream) {
$this->defaultFormat = 'best';