Converted all short tags to full tags
[aur-xilon.git] / web / html / testpo.php
blob75da92ade80e05f37ded05bb385a4669c3b6c219
1 <?php
3 set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang');
5 # This is a sample script to demonstrate how the AUR will
6 # handle i18n. Note: When the PHP script is finished, and
7 # has the proper include file (see below), and the __()
8 # function has been used (see below), use the web/utils/genpopo
9 # script to parse the PHP script and pull out the text
10 # that requires translation and puts the mapping into the
11 # include file.
14 # Each AUR PHP script that requires i18n support, needs to
15 # define an 'xxx_po.inc' file where the i18n mapping will
16 # reside.
18 include("test_po.inc");
21 # Use the __() function to identify text that requires
22 # translation to other languages. The examples below
23 # show how to use %-substitution.
25 print "<html><body bgcolor='white'>\n";
27 print "<p>\n";
28 print __("Select your language here: %h%s%h, %h%s%h, %h%s%h, %h%s%h.",
29 array("<a href='".$_SERVER['PHP_SELF']."?LANG=en'>","English","</a>",
30 "<a href='".$_SERVER['PHP_SELF']."?LANG=es'>","Español","</a>",
31 "<a href='".$_SERVER['PHP_SELF']."?LANG=de'>","Deutsch","</a>",
32 "<a href='".$_SERVER['PHP_SELF']."?LANG=fr'>","Français","</a>"));
33 print "</p>\n";
35 print "<p>\n";
36 print __("My current language tag is: '%s'.", array($LANG));
37 print "</p>\n";
39 print "<ul>\n";
40 print __("Hello, world!")."<br />\n";
41 print __("Hello, again!")."<br />\n";
42 print "</ul>\n";
43 print "</body>\n</html>";
45 # vim: ts=2 sw=2 et ft=php