Inpsyde\MultilingualPress\API\Languages::get_language_by_http_code PHP Method

get_language_by_http_code() public method

Returns the desired field value of the language with the given HTTP code.
Since: 3.0.0
public get_language_by_http_code ( string $http_code, string $field = 'native_name', string | string[] $fallbacks = ['native_name', 'english_name'] ) : string | string[]
$http_code string Language HTTP code.
$field string Optional. The field which should be queried. Defaults to 'native_name'.
$fallbacks string | string[] Optional. Falback language fields. Defaults to native and English name.
return string | string[] The desired field value, an empty string on failure, or an array for field 'all'.
    public function get_language_by_http_code($http_code, $field = 'native_name', $fallbacks = ['native_name', 'english_name']);