php8.5
Home/ Manual/ mbstring / functions/ mb_language

mb_language

PHP function Edit on GitHub ✎

(PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8)

Set/Get current language

Description

mb_language(string|null $language = null): string|bool

Set/Get the current language.

Parameters

language

Used for encoding e-mail messages. The valid languages are listed in the following table. mb_send_mail() uses this setting to encode e-mail.

LanguageCharsetEncodingAlias
German/deISO-8859-15Quoted-PrintableDeutsch
English/enISO-8859-1Quoted-Printable
Armenian/hyArmSCII-8Quoted-Printable
Japanese/jaISO-2022-JPBASE64
Korean/koISO-2022-KRBASE64
neutralUTF-8BASE64
Russian/ruKOI8-RQuoted-Printable
Turkish/trISO-8859-9Quoted-Printable
Ukrainian/uaKOI8-UQuoted-Printable
uniUTF-8BASE64universal
Simplified Chinese/zh-cnHZBASE64
Traditional Chinese/zh-twBIG-5BASE64

Return Values

If language is set and language is valid, it returns true. Otherwise, it returns false. When language is omitted or null, it returns the language name as a string.

Changelog

VersionDescription
8.0.0language is nullable now.

See Also

Source: reference/mbstring/functions/mb-language.xml · from the official PHP manual (php/doc-en)