gettext
(PHP 4, PHP 5, PECL axis2:0.1.0-0.1.1)
gettext — 在目前的域中找尋信息
Description
string gettext
( string $message
)
函數如能找尋到一個譯項則會傳回該譯文段,否則就傳回提交給它的信息參數。 你可以用底線號當作是本函數的別名。
Example#1 gettext()-check
<?php
// Set language to German
putenv ("LANG=de");
// Specify location of translation tables
bindtextdomain ("myPHPApp", "./locale");
// Choose domain
textdomain ("myPHPApp");
// Print a test message
print (gettext ("Welcome to My PHP Application"));
?>