> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kodeflowstudios.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Localization Errors (LOC)

> Errors raised by the Localizer when looking up languages or resolving language IDs.

Localization errors come from the `Localizer` API when a language lookup is invalid or when the registered language table is out of sync with the `LanguageID` enum.

## LOC01

**`GetIDFromCode` called with null or empty string.**

The ISO code argument was missing. The lookup cannot run without a non-empty key.

**Common causes**

* A user-facing setting was read before it was initialized.
* A serialized field defaulted to an empty string.
* The caller passed through an unchecked external value.

**Fix**
Validate the ISO code before calling. Pass a value like `"en"` or `"fr"`.

**Thrown by**

* [KodeFlowStudios.Parley.Localization.Localizer.GetIDFromCode(string)](/parlite/reference/scripting/localization/localizer#getidfromcode-string)

## LOC02

**No language registered with the given ISO code.**

The string was non-empty but no entry in `Localizer.Languages` matches that ISO code.

**Common causes**

* The code is misspelled or uses an unsupported region tag.
* The language exists in the `LanguageID` enum but its `LanguageInfo` has a different code.
* A language was removed from the registry without updating the call site.

**Fix**
Check `Localizer.Languages` for the supported set of codes. Add or correct the entry if the language should be supported.

**Thrown by**

* [KodeFlowStudios.Parley.Localization.Localizer.GetIDFromCode(string)](/parlite/reference/scripting/localization/localizer#getidfromcode-string)

## LOC03

**`GetIDFromEnglishName` called with null or empty string.**

The English-name argument was missing. The lookup cannot run without a non-empty key.

**Common causes**

* A dropdown or settings field was read before being populated.
* The caller forwarded an unchecked external value.

**Fix**
Validate the name before calling. Pass a value like `"English"` or `"French"`.

**Thrown by**

* [KodeFlowStudios.Parley.Localization.Localizer.GetIDFromEnglishName(string)](/parlite/reference/scripting/localization/localizer#getidfromenglishname-string)

## LOC04

**No language registered with the given English name.**

The string was non-empty but no entry in `Localizer.Languages` matches that English name.

**Common causes**

* A typo or casing mismatch in the name.
* The language is registered under a different display name.
* The language was removed from the registry.

**Fix**
Check `Localizer.Languages` for the exact `EnglishName` of each registered language and pass a matching string.

**Thrown by**

* [KodeFlowStudios.Parley.Localization.Localizer.GetIDFromEnglishName(string)](/parlite/reference/scripting/localization/localizer#getidfromenglishname-string)

## LOC05

**`LanguageID` has no matching entry in the `Languages` dictionary.**

A `LanguageID` enum value was used to look up a language, but `Localizer.Languages` has no entry for it.

<Warning>
  The most common cause is extending the `LanguageID` enum without registering a matching entry in `Localizer.Languages`. Every enum value must have a corresponding `LanguageInfo` registered.
</Warning>

**Common causes**

* A new value was added to `LanguageID` without updating `Localizer.Languages`.
* An entry was removed from `Localizer.Languages` while still referenced elsewhere.
* A serialized field holds a `LanguageID` value that is no longer registered.

**Fix**
Add a matching `LanguageInfo` entry to `Localizer.Languages` for the enum value. See [How To: Add a new language](/parlite/how-to/add-new-language).

**Thrown by**

* [KodeFlowStudios.Parley.Localization.Localizer.GetInfoFromID(LanguageID)](/parlite/reference/scripting/localization/localizer#getinfofromidlanguageid)
