renamed _() function to __() to avoid gettext conflict

This commit is contained in:
eric 2004-06-18 22:42:07 +00:00
parent d92682fbfd
commit 74594e516d
9 changed files with 145 additions and 19 deletions

View file

@ -1,7 +1,7 @@
<?
# This is a sample script to demonstrate how the AUR will
# handle i18n. Note: When the PHP script is finished, and
# has the proper include file (see below), and the _()
# has the proper include file (see below), and the __()
# function has been used (see below), use the web/utils/genpopo
# script to parse the PHP script and pull out the text
# that requires translation and puts the mapping into the
@ -15,14 +15,14 @@
include("test_po.inc");
# Use the _() function to identify text that requires
# Use the __() function to identify text that requires
# translation to other languages. The examples below
# show how to use %-substitution.
#
print "<html><body bgcolor='white'>\n";
print "<p>\n";
print _("Select your language here: %h%s%h, %h%s%h, %h%s%h, %h%s%h.",
print __("Select your language here: %h%s%h, %h%s%h, %h%s%h, %h%s%h.",
array("<a href='".$_SERVER['PHP_SELF']."?LANG=en'>","English","</a>",
"<a href='".$_SERVER['PHP_SELF']."?LANG=es'>","Español","</a>",
"<a href='".$_SERVER['PHP_SELF']."?LANG=de'>","Deutsch","</a>",
@ -30,12 +30,12 @@ print _("Select your language here: %h%s%h, %h%s%h, %h%s%h, %h%s%h.",
print "</p>\n";
print "<p>\n";
print _("My current language tag is: '%s'.", array($LANG));
print __("My current language tag is: '%s'.", array($LANG));
print "</p>\n";
print "<ul>\n";
print _("Hello, world!")."<br/>\n";
print _("Hello, again!")."<br/>\n";
print __("Hello, world!")."<br/>\n";
print __("Hello, again!")."<br/>\n";
print "</ul>\n";
print "</body>\n</html>";