Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

mb_language

Description

Set/Get current language

Syntax

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

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.

LanguageCharsetEncoding
de, Deutsch, GermanISO-8859-15Quoted-Printable
en, EnglishISO-8859-1Quoted-Printable
hy, ArmenianArmSCII-8Quoted-Printable
ja, JapaneseISO-2022-JPBASE64
ko, KoreanISO-2022-KRBASE64
neutral, uni, universalUTF-8BASE64
ru, RussianKOI8-RQuoted-Printable
tr, TurkishISO-8859-9Quoted-Printable
ua, UkrainianKOI8-UQuoted-Printable
zh-cn, Simplified ChineseHZBASE64
zh-tw, Traditional ChineseBIG-5BASE64

Return

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.

Examples

1 · void

<?

$return = mb_language();

var_export($return);

?>
'neutral'

2 · language · de

<?

$language = 'de';

$return = mb_language($language);

var_export($return);

?>
true

3 · language · en

<?

$language = 'en';

$return = mb_language($language);

var_export($return);

?>
true

4 · language · hy

<?

$language = 'hy';

$return = mb_language($language);

var_export($return);

?>
true

5 · language · ja

<?

$language = 'ja';

$return = mb_language($language);

var_export($return);

?>
true

6 · language · ko

<?

$language = 'ko';

$return = mb_language($language);

var_export($return);

?>
true

7 · language · neutral

<?

$language = 'neutral';

$return = mb_language($language);

var_export($return);

?>
true

8 · language · ru

<?

$language = 'ru';

$return = mb_language($language);

var_export($return);

?>
true

9 · language · tr

<?

$language = 'tr';

$return = mb_language($language);

var_export($return);

?>
true

10 · language · ua

<?

$language = 'ua';

$return = mb_language($language);

var_export($return);

?>
true

11 · language · zh-cn

<?

$language = 'zh-cn';

$return = mb_language($language);

var_export($return);

?>
true

12 · language · zh-tw

<?

$language = 'zh-tw';

$return = mb_language($language);

var_export($return);

?>
true
HomeMenu