Skip to main content

Module: i18next/src

Classes

Interfaces

Type Aliases

ChannelTarget

Ƭ ChannelTarget: Message | DiscordChannel

Defined in

projects/plugins/packages/i18next/src/lib/types.ts:179


DiscordChannel

Ƭ DiscordChannel: TextBasedDiscordChannel | StoreChannel | StageChannel | VoiceChannel

Defined in

projects/plugins/packages/i18next/src/lib/types.ts:129


DynamicOptions

Ƭ Private DynamicOptions<T>: (namespaces: string[], languages: string[]) => T

Type parameters

NameType
Textends InitOptions

Type declaration

Private (namespaces, languages): T

Parameters
NameType
namespacesstring[]
languagesstring[]
Returns

T

Defined in

projects/plugins/packages/i18next/src/lib/types.ts:53


StringMap

Ƭ StringMap: Object

Index signature

[key: string]: any

Defined in

node_modules/i18next/index.d.ts:694


TFunctionKeys

Ƭ TFunctionKeys: string | TemplateStringsArray

Defined in

node_modules/i18next/index.d.ts:751


TFunctionResult

Ƭ TFunctionResult: string | object | TFunctionDetailedResult | (string | object)[] | undefined | null

Defined in

node_modules/i18next/index.d.ts:744


TOptions

Ƭ TOptions<TInterpolationMap>: TOptionsBase & TInterpolationMap

Type parameters

NameType
TInterpolationMapextends object = StringMap

Defined in

node_modules/i18next/index.d.ts:699


Target

Ƭ Target: BaseCommandInteraction | ChannelTarget | Guild | MessageComponentInteraction

Defined in

projects/plugins/packages/i18next/src/lib/types.ts:180


TextBasedDiscordChannel

Ƭ TextBasedDiscordChannel: Message["channel"]

Defined in

projects/plugins/packages/i18next/src/lib/types.ts:128

Functions

editLocalized

editLocalized<TKeys>(target, keys): Promise<Message>

Type parameters

NameType
TKeysextends TFunctionKeys = string

Parameters

NameTypeDescription
targetMessage<boolean>
keysTKeys | TKeys[]

Returns

Promise<Message>

Defined in

projects/plugins/packages/i18next/src/lib/functions.ts:264

editLocalized<TKeys, TInterpolationMap>(target, options): Promise<Message>

Type parameters

NameType
TKeysextends TFunctionKeys = string
TInterpolationMapextends NonNullObject = StringMap

Parameters

NameTypeDescription
targetMessage<boolean>
optionsLocalizedMessageOptions<TKeys, TInterpolationMap>

Returns

Promise<Message>

Defined in

projects/plugins/packages/i18next/src/lib/functions.ts:289

editLocalized<TKeys>(target, keys): Promise<ReturnType<BaseCommandInteraction | MessageComponentInteraction["editReply"]>>

Type parameters

NameType
TKeysextends TFunctionKeys = string

Parameters

NameTypeDescription
targetBaseCommandInteraction<CacheType> | MessageComponentInteraction<CacheType>
keysTKeys | TKeys[]-

Returns

Promise<ReturnType<BaseCommandInteraction | MessageComponentInteraction["editReply"]>>

Defined in

projects/plugins/packages/i18next/src/lib/functions.ts:305

editLocalized<TKeys, TInterpolationMap>(target, options): Promise<ReturnType<BaseCommandInteraction | MessageComponentInteraction["editReply"]>>

Type parameters

NameType
TKeysextends TFunctionKeys = string
TInterpolationMapextends NonNullObject = StringMap

Parameters

NameTypeDescription
targetBaseCommandInteraction<CacheType> | MessageComponentInteraction<CacheType>
optionsLocalizedInteractionReplyOptions<TKeys, TInterpolationMap>

Returns

Promise<ReturnType<BaseCommandInteraction | MessageComponentInteraction["editReply"]>>

Defined in

projects/plugins/packages/i18next/src/lib/functions.ts:333


fetchLanguage

fetchLanguage(target): Promise<string>

Parameters

NameTypeDescription
targetTarget

Returns

Promise<string>

Defined in

projects/plugins/packages/i18next/src/lib/functions.ts:35


fetchT

fetchT(target): Promise<TFunction>

Parameters

NameTypeDescription
targetTarget

Returns

Promise<TFunction>

Defined in

projects/plugins/packages/i18next/src/lib/functions.ts:72


replyLocalized

replyLocalized<TKeys>(target, keys): Promise<Message>

Type parameters

NameType
TKeysextends TFunctionKeys = string

Parameters

NameTypeDescription
targetMessage<boolean>
keysTKeys | TKeys[]

Returns

Promise<Message>

Defined in

projects/plugins/packages/i18next/src/lib/functions.ts:152

replyLocalized<TKeys, TInterpolationMap>(target, options): Promise<Message>

Type parameters

NameType
TKeysextends TFunctionKeys = string
TInterpolationMapextends NonNullObject = StringMap

Parameters

NameTypeDescription
targetMessage<boolean>
optionsLocalizedMessageOptions<TKeys, TInterpolationMap>

Returns

Promise<Message>

Defined in

projects/plugins/packages/i18next/src/lib/functions.ts:176

replyLocalized<TKeys>(target, keys): Promise<ReturnType<BaseCommandInteraction | MessageComponentInteraction["reply"]>>

Type parameters

NameType
TKeysextends TFunctionKeys = string

Parameters

NameTypeDescription
targetBaseCommandInteraction<CacheType> & { reply: (options: string | MessagePayload | InteractionReplyOptions | ReplyMessageOptions) => Promise<Promise<void>> } & MessageComponentInteraction<CacheType> & { reply: (options: string | MessagePayload | InteractionReplyOptions | ReplyMessageOptions) => Promise<Promise<void>> }
keysTKeys | TKeys[]

Returns

Promise<ReturnType<BaseCommandInteraction | MessageComponentInteraction["reply"]>>

Defined in

projects/plugins/packages/i18next/src/lib/functions.ts:192

replyLocalized<TKeys, TInterpolationMap>(target, options): Promise<ReturnType<BaseCommandInteraction | MessageComponentInteraction["reply"]>>

Type parameters

NameType
TKeysextends TFunctionKeys = string
TInterpolationMapextends NonNullObject = StringMap

Parameters

NameTypeDescription
targetBaseCommandInteraction<CacheType> & { reply: (options: string | MessagePayload | InteractionReplyOptions | ReplyMessageOptions) => Promise<Promise<void>> } & MessageComponentInteraction<CacheType> & { reply: (options: string | MessagePayload | InteractionReplyOptions | ReplyMessageOptions) => Promise<Promise<void>> }
optionsLocalizedInteractionReplyOptions<TKeys, TInterpolationMap>

Returns

Promise<ReturnType<BaseCommandInteraction | MessageComponentInteraction["reply"]>>

Defined in

projects/plugins/packages/i18next/src/lib/functions.ts:223


resolveKey

resolveKey<TResult, TKeys, TInterpolationMap>(target, key, options?): Promise<TResult>

Type parameters

NameType
TResultextends TFunctionResult = string
TKeysextends TFunctionKeys = string
TInterpolationMapextends NonNullObject = StringMap

Parameters

NameTypeDescription
targetTarget
keyTKeys | TKeys[]
options?TOptions<TInterpolationMap>-

Returns

Promise<TResult>

Defined in

projects/plugins/packages/i18next/src/lib/functions.ts:84


sendLocalized

sendLocalized<TKeys>(target, keys): Promise<Message>

Type parameters

NameType
TKeysextends TFunctionKeys = string

Parameters

NameTypeDescription
targetChannelTarget
keysTKeys | TKeys[]

Returns

Promise<Message>

Defined in

projects/plugins/packages/i18next/src/lib/functions.ts:104

sendLocalized<TKeys, TInterpolationMap>(target, options): Promise<Message>

Type parameters

NameType
TKeysextends TFunctionKeys = string
TInterpolationMapextends NonNullObject = StringMap

Parameters

NameTypeDescription
targetChannelTarget
optionsLocalizedMessageOptions<TKeys, TInterpolationMap>

Returns

Promise<Message>

Defined in

projects/plugins/packages/i18next/src/lib/functions.ts:128