mb_language

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

mb_languageSet/Get current language

Descrierea

mixed mb_language ([ string $language = mb_language() ] )

Set/Get the current language.

Parametri

language

Used for encoding e-mail messages. Valid languages are "Japanese", "ja","English","en" and "uni" (UTF-8). mb_send_mail() uses this setting to encode e-mail.

Language and its setting is ISO-2022-JP/Base64 for Japanese, UTF-8/Base64 for uni, ISO-8859-1/quoted printable for English.

Valorile întoarse

If language is set and language is valid, it returns TRUE. Otherwise, it returns FALSE. When language is omitted, it returns the language name as a string. If no language is set previously, it then returns FALSE.

A se vedea și

add a note add a note

User Contributed Notes 3 notes

up
1
Anonymous
1 month ago
In addition, the undocumented "neutral" is also accepted as a valid language setting. That is also the default value if the INI setting is not set:
<?php
var_dump
( mb_language( 'neutral' ) );     // TRUE; accepted as language string
var_dump( mb_language() );                    // 'neutral'
?>

The documentation of this particular INI setting and function is ambiguous.
up
-1
pablorodriguez85 at gmail dot com
3 years ago
In PHP 5.5.9-1ubuntu4.11 (cli) it returns "neutral"
up
-2
Anonymous
4 years ago
In PHP 5.3, mb_language() returns "neutral" by default for me.
To Top