# LanguageSelectionDialogHandle

Import: `import com.install4j.api.test.ui.LanguageSelectionDialogHandle;`

```java
interface LanguageSelectionDialogHandle extends DialogHandle
```

Typed handle for the install4j startup language-selection dialog. Exposes ISO language codes
rather than localized display names, since display names depend on the dialog's currently
loaded resource bundle and are unstable across language switches.

Reach this handle via [`Session.languageDialog`](../session/Session.md#languagedialog).

## Inherited from

- [DialogHandle](DialogHandle.md) — 2 methods
- [UiContainer](UiContainer.md) — 2 methods

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`availableLanguages()`](#availablelanguages) | `List<String>` | The ISO codes of every language offered in the dialog, in display order. |
| [`selectedLanguage()`](#selectedlanguage) | `String` | The ISO code of the language currently highlighted in the drop-down, or the empty string if no language is selected. |
| [`selectLanguage(String)`](#selectlanguage-string) | `LanguageSelectionDialogHandle` | Select the language identified by the given ISO code, for example `"fr"`. |
| [`confirm()`](#confirm) | `void` | Confirm the dialog with the currently highlighted selection. |
| [`cancel()`](#cancel) | `void` | Cancel the dialog. |

### availableLanguages()

```java
List<String> availableLanguages()
```

The ISO codes of every language offered in the dialog, in display order. Example values
are `"en"` and `"zh_CN"`.

### selectedLanguage()

```java
String selectedLanguage()
```

The ISO code of the language currently highlighted in the drop-down, or the empty string
if no language is selected.

### selectLanguage(String)

```java
LanguageSelectionDialogHandle selectLanguage(String isoCode)
```

Select the language identified by the given ISO code, for example `"fr"`. Throws
[`InstallerTestException`](../InstallerTestException.md) if no configured language
matches.

### confirm()

```java
void confirm()
```

Confirm the dialog with the currently highlighted selection.

### cancel()

```java
void cancel()
```

Cancel the dialog. The installer exits with code 1.

