re-using symfony translator

This commit is contained in:
Daniël Klabbers 2017-12-13 21:45:55 +01:00
parent 6280fb2498
commit 93aa3d77b5
No known key found for this signature in database
GPG Key ID: 823B3D5DDF3FBAB6

View File

@ -16,6 +16,7 @@ use Flarum\Foundation\AbstractServiceProvider;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Contracts\Translation\Translator as TranslatorContract;
use Symfony\Component\Translation\MessageSelector;
use Symfony\Component\Translation\TranslatorInterface;
class LocaleServiceProvider extends AbstractServiceProvider
{
@ -48,6 +49,7 @@ class LocaleServiceProvider extends AbstractServiceProvider
});
$this->app->alias('translator', Translator::class);
$this->app->alias('translator', TranslatorContract::class);
$this->app->alias('translator', TranslatorInterface::class);
}
private function getDefaultLocale(): string