switch_to_locale

Advertisement

Summery Summery

Switches the translations according to the given locale.

Syntax Syntax

switch_to_locale( string $locale )

Parameters Parameters

$locale

(Required) The locale.

Return Return

(bool) True on success, false on failure.

Source Source

File: wp-includes/l10n.php

			'<option value="%s" lang="%s"%s data-installed="1">%s</option>',
			esc_attr( $language['language'] ),
			esc_attr( $language['lang'] ),
			selected( $language['language'], $parsed_args['selected'], false ),
			esc_html( $language['native_name'] )
		);

Advertisement

Changelog Changelog

Changelog
Version Description
4.7.0 Introduced.

Advertisement

Leave a Reply