Class: I18nMiddleware
Implements
NestMiddleware
Constructors
constructor
• new I18nMiddleware(i18nOptions
, i18nResolvers
, i18nService
, moduleRef
)
Parameters
Name | Type |
---|---|
i18nOptions | I18nOptions |
i18nResolvers | I18nOptionResolver [] |
i18nService | I18nService <Record <string , unknown >> |
moduleRef | ModuleRef |
Defined in
src/middlewares/i18n.middleware.ts:29
Properties
i18nOptions
• Private
Readonly
i18nOptions: I18nOptions
Defined in
src/middlewares/i18n.middleware.ts:31
i18nResolvers
• Private
Readonly
i18nResolvers: I18nOptionResolver
[]
Defined in
src/middlewares/i18n.middleware.ts:33
i18nService
• Private
Readonly
i18nService: I18nService
<Record
<string
, unknown
>>
Defined in
src/middlewares/i18n.middleware.ts:34
moduleRef
• Private
Readonly
moduleRef: ModuleRef
Defined in
src/middlewares/i18n.middleware.ts:35
Methods
getResolver
▸ Private
getResolver(r
): Promise
<I18nResolver
>
Parameters
Name | Type |
---|---|
r | I18nOptionResolver |
Returns
Promise
<I18nResolver
>
Defined in
src/middlewares/i18n.middleware.ts:78
use
▸ use(req
, res
, next
): Promise
<any
>
Parameters
Name | Type |
---|---|
req | any |
res | any |
next | any |
Returns
Promise
<any
>
Implementation of
NestMiddleware.use