wp_dropdown_languages
wp_dropdown_languages ( $args = array() )
Parameters:- (string|array) args {
Optional. Array or string of arguments for outputting the language selector.
@type string $id ID attribute of the select element. Default 'locale'.
@type string $name Name attribute of the select element. Default 'locale'.
@type string[] $languages List of installed languages, contain only the locales.
Default empty array.
@type array $translations List of available translations. Default result of
wp_get_available_translations().
@type string $selected Language which should be selected. Default empty.
@type bool|int $echo Whether to echo the generated markup. Accepts 0, 1, or their
boolean equivalents. Default 1.
@type bool $show_available_translations Whether to show available translations. Default true.
@type bool $show_option_site_default Whether to show an option to fall back to the site's locale. Default false.
@type bool $show_option_en_us Whether to show an option for English (United States). Default true.
@type bool $explicit_option_en_us Whether the English (United States) option uses an explicit value of en_US
instead of an empty value. Default false.
}
See:Returns:- (string) HTML dropdown list of languages.
Defined at:Change Log: - Introduced in WordPress: 4.0.0
- Deprecated in WordPress: —
Description
Displays or returns a Language selector.