1 | const {
|
2 | ServiceProvider,
|
3 | } = require('@adonisjs/fold');
|
4 |
|
5 | class LintlProvider extends ServiceProvider {
|
6 | /**
|
7 | * Register method called by the Ioc container
|
8 | * to register the provider
|
9 | *
|
10 | * @method register
|
11 | *
|
12 | * @return {void}
|
13 | */
|
14 | register() {
|
15 | this.app.singleton('Lesswork/Src/Lintl', (app) => {
|
16 | const Lintl = require('../src/Lintl');
|
17 |
|
18 | return new Lintl(app.use('App'), app.use('Helpers'), app.use('Config').get('app.fallback_locale'));
|
19 | });
|
20 | }
|
21 | }
|
22 |
|
23 | module.exports = LintlProvider; |
\ | No newline at end of file |