public function register()
{
$this->app->singleton('Flarum\\Locale\\LocaleManager');
$this->app->alias('Flarum\\Locale\\LocaleManager', 'flarum.localeManager');
$this->app->singleton('translator', function () {
$defaultLocale = $this->getDefaultLocale();
$translator = new Translator($defaultLocale, new MessageSelector());
$translator->setFallbackLocales([$defaultLocale, 'en']);
$translator->addLoader('prefixed_yaml', new PrefixedYamlFileLoader());
return $translator;
});
$this->app->alias('translator', 'Symfony\\Component\\Translation\\Translator');
$this->app->alias('translator', 'Symfony\\Component\\Translation\\TranslatorInterface');
}