Skip to main content

Module: i18next/src

Classes

Interfaces

Type Aliases

BuilderWithNameAndDescription

Ƭ BuilderWithNameAndDescription: BuilderWithName & BuilderWithDescription

Defined in

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


ChannelTarget

Ƭ ChannelTarget: Message | DiscordChannel

Defined in

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


DiscordChannel

Ƭ DiscordChannel: TextBasedDiscordChannel | StageChannel | VoiceChannel

Defined in

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


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:63


TFunctionKeys

Ƭ TFunctionKeys: TFuncKey | TemplateStringsArray extends infer A ? A : never

Defined in

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


TFunctionResult

Ƭ TFunctionResult<N, TKPrefix>: TFuncReturn<N, TFunctionKeys, DefaultTFuncReturnWithObject, TKPrefix>

Type parameters

NameType
Nextends Namespace = TypeOptions["defaultNS"]
TKPrefixundefined

Defined in

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


TOptions

Ƭ TOptions<TInterpolationMap>: TOptionsBase & TInterpolationMap

Type parameters

NameType
TInterpolationMapextends object = StringMap

Defined in

node_modules/i18next/index.d.ts:717


Target

Ƭ Target: CommandInteraction | ChannelTarget | Guild | MessageComponentInteraction

Defined in

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


TextBasedDiscordChannel

Ƭ TextBasedDiscordChannel: Message["channel"]

Defined in

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

Functions

applyDescriptionLocalizedBuilder

applyDescriptionLocalizedBuilder<T>(builder, key): T

Type parameters

NameType
Textends BuilderWithDescription<T>

Parameters

NameTypeDescription
builderT
keystring | TemplateStringsArray

Returns

T

Defined in

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


applyLocalizedBuilder

applyLocalizedBuilder<T>(builder, ...params): T

Type parameters

NameType
Textends BuilderWithName<T> & BuilderWithDescription<T>

Parameters

NameTypeDescription
builderT
...params[root: string] | [name: string | TemplateStringsArray, description: string | TemplateStringsArray]

Returns

T

Defined in

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


applyNameLocalizedBuilder

applyNameLocalizedBuilder<T>(builder, key): T

Type parameters

NameType
Textends BuilderWithName<T>

Parameters

NameTypeDescription
builderT
keystring | TemplateStringsArray

Returns

T

Defined in

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


createLocalizedChoice

createLocalizedChoice<ValueType>(key, options): APIApplicationCommandOptionChoice<ValueType>

Type parameters

NameType
ValueTypestring | number

Parameters

NameTypeDescription
keystring | TemplateStringsArray
optionsOmit<APIApplicationCommandOptionChoice<ValueType>, "name" | "name_localizations">

Returns

APIApplicationCommandOptionChoice<ValueType>

Defined in

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


fetchLanguage

fetchLanguage(target): Promise<string>

Parameters

NameTypeDescription
targetTarget

Returns

Promise<string>

Defined in

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


fetchT

fetchT(target): Promise<TFunction<"translation", undefined, "translation">>

Parameters

NameTypeDescription
targetTarget

Returns

Promise<TFunction<"translation", undefined, "translation">>

Defined in

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


getLocalizedData

getLocalizedData(key): LocalizedData

Parameters

NameTypeDescription
keystring | TemplateStringsArray

Returns

LocalizedData

Defined in

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


resolveKey

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

Type parameters

NameType
TResultextends DefaultTFuncReturnWithObject = string
TKeysextends string = string
TInterpolationMapextends object = StringMap

Parameters

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

Returns

Promise<TResult>

Defined in

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