World of Warcraft Forever API · Localization.md, for your AI
Localization (global functions)
11 functions, 1 tables, as Blizzard documents them for Forever 1.60.1 (70959).
Making an addon with an AI? Tell it: Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it. It checks every call against this API before you try it in the game, then publishes it here. How it works.
Functions
AbbreviateLargeNumbers
result = AbbreviateLargeNumbers(number, [options])
Arguments
number | number | |
|---|---|---|
options | NumberAbbrevOptions may be nil |
Returns
result | string |
|---|
AbbreviateNumbers
result = AbbreviateNumbers(number, [options])
Arguments
number | number | |
|---|---|---|
options | NumberAbbrevOptions may be nil |
Returns
result | string |
|---|
BreakUpLargeNumbers
result = BreakUpLargeNumbers(largeNumber, [natural])
Arguments
largeNumber | number | |
|---|---|---|
natural | bool default false |
Returns
result | string |
|---|
CaseAccentInsensitiveParse
result = CaseAccentInsensitiveParse(name)
Arguments
name | cstring |
|---|
Returns
result | string |
|---|
CreateAbbreviateConfig
config = CreateAbbreviateConfig(data)
Arguments
data | NumberAbbreviationBreakpoint[] |
|---|
Returns
config | AbbreviateConfig |
|---|
DeclineName
declinedNames = DeclineName(name, [gender], declensionSet, [namePartType])
Arguments
name | cstring | |
|---|---|---|
gender | UnitSex may be nil | |
declensionSet | luaIndex | |
namePartType | NamePartType may be nil |
Returns
declinedNames | string |
|---|
GetDefaultAbbreviationBreakpoints
breakpoints = GetDefaultAbbreviationBreakpoints([locale])
Arguments
locale | WowLocale may be nil |
|---|
Returns
breakpoints | NumberAbbreviationBreakpoint[] |
|---|
GetNumDeclensionSets
numDeclensionSets = GetNumDeclensionSets(name, [gender], [namePartType])
Arguments
name | cstring | |
|---|---|---|
gender | UnitSex may be nil | |
namePartType | NamePartType may be nil |
Returns
numDeclensionSets | number |
|---|
IsEuropeanNumbers
enabled = IsEuropeanNumbers()
Returns
enabled | bool |
|---|
LocalizedClassList
result = LocalizedClassList([isFemale])
Arguments
isFemale | bool default false |
|---|
Returns
result | LuaValueVariant |
|---|
SetEuropeanNumbers
SetEuropeanNumbers(enabled)
Arguments
enabled | bool |
|---|
Tables
NumberAbbrevOptions structure
breakpointData | NumberAbbreviationBreakpoint[] may be nil | Order these from largest to smallest. |
|---|---|---|
locale | cstring may be nil | Locale controls whether standard asian abbreviation data will be used along with a small change in behavior for large number abbreviation when fractionDivisor is greater than zero. |
config | AbbreviateConfig may be nil | Provides a cached config object for optimal performance when calling abbreviation functions multiple times with the same options. |