PHP Класс Inpsyde\MultilingualPress\Common\Type\AliasAwareLanguage

С версии: 3.0.0
Наследование: implements Inpsyde\MultilingualPress\Common\Type\Language
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( array $data ) Constructor. Sets up the properies.
is_rtl ( ) : boolean Checks if the language is written right-to-left (RTL).
name ( string $output = 'native' ) : string Returns the language name (or code) according to the given argument.
priority ( ) : integer Returns the language priority.

Приватные методы

Метод Описание
get_names ( array $data ) : string[] Returns the complete set of language names and codes for the given language data.

Описание методов

__construct() публичный Метод

Constructor. Sets up the properies.
С версии: 3.0.0
public __construct ( array $data )
$data array Language data.

is_rtl() публичный Метод

Checks if the language is written right-to-left (RTL).
С версии: 3.0.0
public is_rtl ( ) : boolean
Результат boolean Whether or not the language is written right-to-left (RTL).

name() публичный Метод

Returns the language name (or code) according to the given argument.
С версии: 3.0.0
public name ( string $output = 'native' ) : string
$output string Optional. Output type. Defaults to 'native'. TODO: Check/Adapt formatting to provide best possible readibility for both inline and rendered documentation. Possible values: * native: Native name of the language (default, e.g., "Deutsch" for German). * english: English name of the language. * custom: Language name as defined in the site settings. * text: Alias for "custom". * http: HTTP code of the language (e.g., "de-DE"). * language_long: Alias for "http". * language_short: First part of "http" (e.g., "de" for "de-DE"). * lang: Alias for "language_short". * wp_locale: WordPress locale representing the language. * none: No text output (e.g,. for displaying the flag icon only).
Результат string Language name (or code) according to the given argument.

priority() публичный Метод

Returns the language priority.
С версии: 3.0.0
public priority ( ) : integer
Результат integer Language priority.