Skip to main content

Class: I18nMiddleware

Implements

  • NestMiddleware

Constructors

constructor

new I18nMiddleware(i18nOptions, i18nResolvers, i18nService, moduleRef)

Parameters

NameType
i18nOptionsI18nOptions
i18nResolversI18nOptionResolver[]
i18nServiceI18nService<Record<string, unknown>>
moduleRefModuleRef

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

NameType
rI18nOptionResolver

Returns

Promise<I18nResolver>

Defined in

src/middlewares/i18n.middleware.ts:78


use

use(req, res, next): Promise<any>

Parameters

NameType
reqany
resany
nextany

Returns

Promise<any>

Implementation of

NestMiddleware.use

Defined in

src/middlewares/i18n.middleware.ts:38