Language_Helper::has_function_word_support()publicYoast 1.0

Checks whether the given language has function word support. (E.g. function words are used or filtered out for this language when doing some SEO and readability assessments).

{} Это метод класса: Language_Helper{}

Хуков нет.


true|false. Whether the language has function word support.


$Language_Helper = new Language_Helper();
$Language_Helper->has_function_word_support( $language );
$language(строка) (обязательный)
The language to check.

Код Language_Helper::has_function_word_support() Yoast 19.2

public function has_function_word_support( $language ) {
	$supported_languages = [ 'en', 'de', 'nl', 'fr', 'es', 'it', 'pt', 'ru', 'pl', 'sv', 'id', 'he', 'ar', 'hu', 'nb', 'tr', 'cs', 'sk', 'fa', 'el', 'ja' ];

	return \in_array( $language, $supported_languages, true );