> ## 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.

# Localizer

> Namespace: KodeFlowStudios.Parley.Localization

Static lookup and helpers for everything language-related.

**Declaration**

```c# theme={null}
public static class Localizer
```

#### Description

Central entry point for language metadata and runtime language state in Parley. Use it to resolve a `LanguageID` from an ISO code, look up a language's English name and reading direction, or query the active language at runtime. All members are static.

## Fields

### FallbackLanguage

Default language used whenever a call doesn't pass one explicitly.

**Declaration**

```csharp theme={null}
public static LanguageID FallbackLanguage
```

### FallbackTextDirection

Default text direction for the fallback language.

**Declaration**

```csharp theme={null}
public static TextDirection FallbackTextDirection
```

### Languages

The master registry that maps every <see cref="LanguageID" /> to its
ISO code, native spelling, and English name. Keep this in sync
with the enum above, or lookups will throw at runtime.

**Declaration**

```csharp theme={null}
public static readonly Dictionary<LanguageID, LanguageInfo> Languages
```

## Methods

### GetIDFromCode(string)

Finds a `LanguageID` by its lowercase ISO code (e.g. "en").

**Declaration**

```csharp theme={null}
public static LanguageID GetIDFromCode(string code)
```

**Parameters**

<ParamField path="code" type="string" required>
  ISO 639-1 code (e.g. "en"). Case-insensitive. Must match an entry in [Languages](#languages).
</ParamField>

**Returns**

<ResponseField name="result" type="LanguageID">
  The LanguageID registered for the given code.
</ResponseField>

### GetIDFromEnglishName(string)

Finds a `LanguageID` by its English name (e.g. "English", "Arabic"). Case-insensitive.

**Declaration**

```csharp theme={null}
public static LanguageID GetIDFromEnglishName(string name)
```

**Parameters**

<ParamField path="name" type="string" required>
  English name for the language. Case-insensitive. Must match an entry in [Languages](#languages).
</ParamField>

**Returns**

<ResponseField name="result" type="LanguageID">
  The LanguageID registered for the given name.
</ResponseField>

### GetInfoFromID(LanguageID)

Returns the full `LanguageInfo` for a given `LanguageID`.

**Declaration**

```csharp theme={null}
public static LanguageInfo GetInfoFromID(LanguageID language)
```

**Parameters**

<ParamField path="language" type="LanguageID" required>
  LanguageID for the language. Must match an entry in [Languages](#languages) and its correspondant in [LanguageID](/parlite/reference/scripting/localization/language-id).
</ParamField>

**Returns**

<ResponseField name="result" type="LanguageInfo">
  The LanguageInfo registered for the given LanguageID.
</ResponseField>

## GetInfoFromCode(string)

Returns the full <see cref="LanguageInfo" /> for a given ISO 639-1 code (e.g. "en"). Case-insensitive.

**Declaration**

```csharp theme={null}
public static LanguageInfo GetInfoFromCode(string code)
```

**Parameters**

<ParamField path="code" type="string" required>
  ISO 639-1 code (e.g. "en"). Case-insensitive. Must match an entry in [Languages](#languages).
</ParamField>

**Returns**

<ResponseField name="result" type="LanguageInfo">
  The LanguageInfo registered for the given code.
</ResponseField>
