(PHP3 >= 3.0.7, PHP4 )
gettext -- Lookup a message in the current domain
Description
string gettext
(string message)
This function returns a translated string if one is found in the
translation table, or the submitted message if not found. You may
use an underscore character as an alias to this function.
Példa 1. Gettext()-check 1
2 <?php
3 // Set language to German
4 putenv ("LANG=de");
5
6 // Specify location of translation tables
7 bindtextdomain ("myPHPApp", "./locale");
8
9 // Choose domain
10 textdomain ("myPHPApp");
11
12 // Print a test message
13 print (gettext ("Welcome to My PHP Application"));
14 ?>
15 |
|