Skip to main content

Class: I18nModule

Implements

  • OnModuleInit
  • OnModuleDestroy
  • NestModule

Constructors

constructor

new I18nModule(i18n, translations, i18nOptions, adapter)

Parameters

NameType
i18nI18nService<Record<string, unknown>>
translationsObservable<I18nTranslation>
i18nOptionsI18nOptions
adapterHttpAdapterHost<AbstractHttpAdapter<any, any, any>>

Defined in

src/i18n.module.ts:67

Properties

adapter

Private adapter: HttpAdapterHost<AbstractHttpAdapter<any, any, any>>

Defined in

src/i18n.module.ts:72


i18n

Private Readonly i18n: I18nService<Record<string, unknown>>

Defined in

src/i18n.module.ts:68


i18nOptions

Private Readonly i18nOptions: I18nOptions

Defined in

src/i18n.module.ts:71


translations

Private translations: Observable<I18nTranslation>

Defined in

src/i18n.module.ts:70


unsubscribe

Private unsubscribe: Subject<void>

Defined in

src/i18n.module.ts:65

Methods

configure

configure(consumer): void

Parameters

NameType
consumerMiddlewareConsumer

Returns

void

Implementation of

NestModule.configure

Defined in

src/i18n.module.ts:152


onModuleDestroy

onModuleDestroy(): void

Returns

void

Implementation of

OnModuleDestroy.onModuleDestroy

Defined in

src/i18n.module.ts:148


onModuleInit

onModuleInit(): Promise<void>

Returns

Promise<void>

Implementation of

OnModuleInit.onModuleInit

Defined in

src/i18n.module.ts:75


createAsyncLanguagesProvider

Static Private createAsyncLanguagesProvider(): Provider<any>

Returns

Provider<any>

Defined in

src/i18n.module.ts:376


createAsyncLoaderOptionsProvider

Static Private createAsyncLoaderOptionsProvider(): Provider<any>

Returns

Provider<any>

Defined in

src/i18n.module.ts:343


createAsyncOptionsProvider

Static Private createAsyncOptionsProvider(options): Provider<any>

Parameters

NameType
optionsI18nAsyncOptions

Returns

Provider<any>

Defined in

src/i18n.module.ts:319


createAsyncTranslationProvider

Static Private createAsyncTranslationProvider(): Provider<any>

Returns

Provider<any>

Defined in

src/i18n.module.ts:353


createResolverProviders

Static Private createResolverProviders(resolvers?): Provider<any>[]

Parameters

NameType
resolvers?I18nOptionResolver[]

Returns

Provider<any>[]

Defined in

src/i18n.module.ts:406


forRoot

Static forRoot(options): DynamicModule

Parameters

NameType
optionsI18nOptions

Returns

DynamicModule

Defined in

src/i18n.module.ts:162


forRootAsync

Static forRootAsync(options): DynamicModule

Parameters

NameType
optionsI18nAsyncOptions

Returns

DynamicModule

Defined in

src/i18n.module.ts:259


sanitizeI18nOptions

Static Private sanitizeI18nOptions<T>(options): T

Type parameters

NameType
TI18nOptions | I18nAsyncOptions

Parameters

NameType
optionsT

Returns

T

Defined in

src/i18n.module.ts:399