# C_Intl: World of Warcraft Forever API

Forever 1.60.1 (70959), Interface 16001, Lua 5.1, from Blizzard's own API documentation. Page: https://wowaddons.gg/forever-api/C_Intl

## Functions

### C_Intl.CompareStrings

```lua
result = C_Intl.CompareStrings(left, right, strength)
```

Compares two UTF-8 strings using the options specified on a collator.

May return nothing.

Arguments:
- `left`: cstring. The first UTF-8 string passed to collation comparison.
- `right`: cstring. The second UTF-8 string passed to collation comparison.
- `strength`: CollationStrength. The comparison level used by the collator for ordering and equality.

Returns:
- `result`: number. The comparison result: less than, equal to, or greater than zero.

### C_Intl.CreateLocaleContext

```lua
context = C_Intl.CreateLocaleContext(locale)
```

Creates a locale context object for locale-scoped internationalization operations.

Arguments:
- `locale`: cstring. The locale ID used to initialize the locale context object.

Returns:
- `context`: LuaLocaleContext. A locale context userdata object for calling locale-scoped APIs.

### C_Intl.FindBreaks

```lua
byteOffsets = C_Intl.FindBreaks(text, breakType)
```

Opens a break iterator for locating text boundaries in a specified locale.

May return nothing.

Arguments:
- `text`: cstring. The UTF-8 text whose boundary offsets are requested.
- `breakType`: BreakType. The break iterator kind to use for boundary analysis.

Returns:
- `byteOffsets`: luaIndex[]. The native UTF-8 string indices for the text boundaries (returned with 1-based indexes for lua convenience).

### C_Intl.FindStringMatches

```lua
byteOffsets = C_Intl.FindStringMatches(text, pattern, strength)
```

Creates a string search iterator using a collator and returns every match position.

May return nothing.

Arguments:
- `text`: cstring. The UTF-8 text scanned by the string search iterator.
- `pattern`: cstring. The UTF-8 pattern whose collation-aware matches are returned.
- `strength`: CollationStrength. The comparison level used by the collator while searching for matches.

Returns:
- `byteOffsets`: luaIndex[]. The UTF-8 byte offsets of matches in the text (returned with 1-based indexes for lua convenience).

### C_Intl.FoldCase

```lua
result = C_Intl.FoldCase(text)
```

Case-folds the characters in a string; case-folding is locale-independent and not context-sensitive.

May return nothing.

Arguments:
- `text`: cstring. The UTF-8 text converted with locale-independent case folding.

Returns:
- `result`: string. The case-folded string, which may be longer or shorter than the original.

### C_Intl.FormatCurrency

```lua
result = C_Intl.FormatCurrency(number, currencyCode)
```

Formats a double as a localized currency value using the provided ISO 4217 currency code.

May return nothing.

Arguments:
- `number`: number. The double value formatted by the locale currency formatter.
- `currencyCode`: cstring. The 3-letter null-terminated ISO 4217 currency code for currency formatting.

Returns:
- `result`: string. The localized currency text produced by the formatter.

### C_Intl.FormatDate

```lua
result = C_Intl.FormatDate(unixTimeSeconds, style, timeZone)
```

Formats Unix time as localized date text using locale date patterns, symbols, style, and optional time zone.

May return nothing.

Arguments:
- `unixTimeSeconds`: number. The date as seconds since the Unix epoch; this API converts it to milliseconds.
- `style`: DateTimeStyle. The date format length; None omits the date portion.
- `timeZone`: cstring. The time zone ID applied to the formatter; empty strings keep the formatter default.

Returns:
- `result`: string. The formatted date string.

### C_Intl.FormatDateTime

```lua
result = C_Intl.FormatDateTime(unixTimeSeconds, dateStyle, timeStyle, timeZone)
```

Formats Unix time as localized date and time text using locale patterns, symbols, styles, and optional time zone.

May return nothing.

Arguments:
- `unixTimeSeconds`: number. The date and time as seconds since the Unix epoch; this API converts it to milliseconds.
- `dateStyle`: DateTimeStyle. The date format length; None omits the date portion.
- `timeStyle`: DateTimeStyle. The time format length; None omits the time portion.
- `timeZone`: cstring. The time zone ID applied to the formatter; empty strings keep the formatter default.

Returns:
- `result`: string. The formatted date and time string.

### C_Intl.FormatNumber

```lua
result = C_Intl.FormatNumber(number, style)
```

Formats a double with locale number formatting using locale symbols, grouping, and the selected non-currency style.

May return nothing.

Arguments:
- `number`: number. The double value formatted according to the selected number formatter.
- `style`: NumberStyle. The number style to format with; Currency is not accepted here, use FormatCurrency instead.

Returns:
- `result`: string. The localized number text produced by the formatter.

### C_Intl.FormatTime

```lua
result = C_Intl.FormatTime(unixTimeSeconds, style, timeZone)
```

Formats Unix time as localized time text using locale time patterns, symbols, style, and optional time zone.

May return nothing.

Arguments:
- `unixTimeSeconds`: number. The time as seconds since the Unix epoch; this API converts it to milliseconds.
- `style`: DateTimeStyle. The time format length; None omits the time portion.
- `timeZone`: cstring. The time zone ID applied to the formatter; empty strings keep the formatter default.

Returns:
- `result`: string. The formatted time string.

### C_Intl.GetCharacterProperties

```lua
result = C_Intl.GetCharacterProperties(text)
```

Returns Unicode property values for the first code point in a string.

May return nothing.

Arguments:
- `text`: cstring. The string whose first code point is tested.

Returns:
- `result`: CharacterProperties. Unicode property values for the first code point.

### C_Intl.GetCurrencyFractionDigits

```lua
result = C_Intl.GetCurrencyFractionDigits(currencyCode)
```

Returns the number of fraction digits that should be displayed for the given currency.

May return nothing.

Arguments:
- `currencyCode`: cstring. The null-terminated 3-letter ISO 4217 currency code.

Returns:
- `result`: number. The non-negative number of fraction digits to be displayed, or 0 if the lookup fails.

### C_Intl.GetCurrencyName

```lua
result = C_Intl.GetCurrencyName(currencyCode, nameStyle)
```

Returns the display name for a currency in the given locale.

May return nothing.

Arguments:
- `currencyCode`: cstring. The null-terminated 3-letter ISO 4217 currency code.
- `nameStyle`: CurrencyNameStyle. The selector for which kind of currency name to return.

Returns:
- `result`: string. The display string for the currency, or the currency code itself if no localized name is available.

### C_Intl.GetCurrentLocale

```lua
result = C_Intl.GetCurrentLocale()
```

Gets the current locale used by C_Intl.

Returns:
- `result`: cstring. The current locale ID.

### C_Intl.GetDisplayName

```lua
result = C_Intl.GetDisplayName(displayLocale)
```

Gets a display name suitable for the specified locale.

May return nothing.

Arguments:
- `displayLocale`: cstring. The locale whose language conventions are used for the display name

Returns:
- `result`: string. The displayable name for the locale.

### C_Intl.GetSortKey

```lua
sortKey = C_Intl.GetSortKey(text, strength)
```

Transforms a string into a collation sort key.

May return nothing.

Arguments:
- `text`: cstring. The UTF-8 text converted into collation sort-key bytes.
- `strength`: CollationStrength. The comparison level used by the collator; lower strengths ignore later-level differences.

Returns:
- `sortKey`: string. The sort key bytes excluding the terminating zero byte.

### C_Intl.IsNormalized

```lua
isNormalized = C_Intl.IsNormalized(text, form)
```

Tests if the string is normalized according to the specified normalization form.

Arguments:
- `text`: cstring. The UTF-8 text checked against the requested normalization form.
- `form`: NormalizationForm. The normalization form to test against.

Returns:
- `isNormalized`: bool. True if the string is normalized according to the specified form.

### C_Intl.Length

```lua
result = C_Intl.Length(text)
```

Counts character break boundaries in UTF-8 text.

May return nothing.

Arguments:
- `text`: cstring. The UTF-8 text counted by character break iteration.

Returns:
- `result`: number. The number of character boundaries minus the initial boundary.

### C_Intl.Normalize

```lua
result = C_Intl.Normalize(text, form)
```

Writes the normalized form of the source string to the destination string.

May return nothing.

Arguments:
- `text`: cstring. The UTF-8 text that is normalized.
- `form`: NormalizationForm. The normalization form to write.

Returns:
- `result`: string. The normalized form of the source string.

### C_Intl.ParseCurrency

```lua
result = C_Intl.ParseCurrency(text)
```

Parses an entire localized currency string into a double amount and ISO 4217 currency code.

May return nothing.

Arguments:
- `text`: cstring. The localized currency text to parse for both amount and ISO 4217 code.

Returns:
- `result`: CurrencyParseResult. The numeric amount and ISO 4217 currency code parsed from the localized currency text.

### C_Intl.ParseNumber

```lua
result = C_Intl.ParseNumber(text, style)
```

Parses an entire localized number string into a double using the selected non-currency number formatter.

May return nothing.

Arguments:
- `text`: cstring. The localized numeric text to parse with the selected style.
- `style`: NumberStyle. The number style to parse with; Currency is not accepted here, use ParseCurrency instead.

Returns:
- `result`: number. The numeric value parsed from the localized number text.

### C_Intl.SelectPlural

```lua
result = C_Intl.SelectPlural(number, pluralType)
```

Returns the keyword of the first plural rule that applies to a number.

May return nothing.

Arguments:
- `number`: number. The number for which the plural rule has to be determined.
- `pluralType`: PluralType. The plural rule type, cardinal or ordinal.

Returns:
- `result`: string. The plural keyword for the rule that applies to the number.

### C_Intl.ToLower

```lua
result = C_Intl.ToLower(text)
```

Lowercases the characters in a string; casing is locale-dependent and context-sensitive.

May return nothing.

Arguments:
- `text`: cstring. The UTF-8 text whose characters are lowercased.

Returns:
- `result`: string. The lowercased string, which may be longer or shorter than the original.

### C_Intl.ToTitle

```lua
result = C_Intl.ToTitle(text)
```

Titlecases a string using titlecase positions determined by the default Unicode algorithm.

May return nothing.

Arguments:
- `text`: cstring. The UTF-8 text whose titlecase positions are mapped.

Returns:
- `result`: string. The titlecased string, which may be longer or shorter than the original.

### C_Intl.ToUpper

```lua
result = C_Intl.ToUpper(text)
```

Uppercases the characters in a string; casing is locale-dependent and context-sensitive.

May return nothing.

Arguments:
- `text`: cstring. The UTF-8 text whose characters are uppercased.

Returns:
- `result`: string. The uppercased string, which may be longer or shorter than the original.

### C_Intl.TransformLocale

```lua
result = C_Intl.TransformLocale(transform)
```

Applies a locale transform to the current locale and returns the transformed locale string.

May return nothing.

Arguments:
- `transform`: LocaleTransform. The locale transform to apply.

Returns:
- `result`: string. The transformed locale string.

### C_Intl.Transliterate

```lua
result = C_Intl.Transliterate(text, transliteratorID)
```

Opens a system transliterator by ID and transliterates the text in place.

May return nothing.

Arguments:
- `text`: cstring. The UTF-8 text converted by the opened transliterator.
- `transliteratorID`: cstring. A registered transliterator ID, such as a source-target system transliterator.

Returns:
- `result`: string. The UTF-8 text after transliterator rules are applied.

---
Make an addon with your 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."
