LanguageSelectionDialogHandle (install4j API)
Description: declaration: package: com.install4j.api.test.ui, interface: LanguageSelectionDialogHandle

# Interface LanguageSelectionDialogHandle

All Superinterfaces:
  `DialogHandle, UiContainer`

public 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()`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<String>`
  `availableLanguages()`
  The ISO codes of every language offered in the dialog, in display order.
  `void`
  `cancel()`
  Cancel the dialog.
  `void`
  `confirm()`
  Confirm the dialog with the currently highlighted selection.
  `String`
  `selectedLanguage()`
  The ISO code of the language currently highlighted in the drop-down, or the empty string if no language is selected.
  `LanguageSelectionDialogHandle`
  `selectLanguage(String isoCode)`
  Select the language identified by the given ISO code, for example `"fr"`.

  ### Methods inherited from interface DialogHandle

  `clickWindowClose, getTitle`

  ### Methods inherited from interface UiContainer

  `dumpAsString, saveScreenshot`

- ## Method Details

  - ### availableLanguages

    @NotNull List<String> availableLanguages()
    The ISO codes of every language offered in the dialog, in display order. Example values are `"en"` and `"zh_CN"`.

  - ### selectedLanguage

    @NotNull String selectedLanguage()
    The ISO code of the language currently highlighted in the drop-down, or the empty string if no language is selected.

  - ### selectLanguage

    @NotNull LanguageSelectionDialogHandle selectLanguage(@NotNull String isoCode)
    Select the language identified by the given ISO code, for example `"fr"`. Throws `InstallerTestException` if no configured language matches.

  - ### confirm

    void confirm()
    Confirm the dialog with the currently highlighted selection.

  - ### cancel

    void cancel()
    Cancel the dialog. The installer exits with code 1.