PHP Doku:: Set/Get current language - function.mb-language.html

Verlauf / Chronik / History: (1) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzUnterstützung menschlicher Sprache und ZeichenkodierungMultibyte StringMultibyte String Funktionenmb_language

Ein Service von Reinhard Neidl - Webprogrammierung.

Multibyte String Funktionen

<<mb_internal_encoding

mb_list_encodings>>

mb_language

(PHP 4 >= 4.0.6, PHP 5)

mb_languageSet/Get current language

Beschreibung

mixed mb_language ([ string $language ] )

Set/Get the current language.

Parameter-Liste

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.

Rückgabewerte

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.

Siehe auch


Ein BenutzerBeitrag:
- Beiträge aktualisieren...
Sohel Taslim
19.09.2007 7:52
It can help you to send an email as with Japanese contain.

<?php

   
       mb_language
("ja");
      
$subject = mb_convert_encoding($subject, "ISO-2022-JP","AUTO");
      
$subject = mb_encode_mimeheader($subject);
   
      
$result = mail($to, $subject, $body, $headers, $sendmail_params);
      
       
?>



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)