User Tools

Site Tools


Sidebar

Writing /var/www/html/john.de-graaff.net/webroot/wiki/data/cache/2/2b6973632eff8088fd1452229ae9aa9e.metadata failed
Writing /var/www/html/john.de-graaff.net/webroot/wiki/data/cache/1/1f10ce0ff6fdde6fb355676c1344517e.metadata failed
Writing /var/www/html/john.de-graaff.net/webroot/wiki/data/cache/1/1f10ce0ff6fdde6fb355676c1344517e.xhtml failed

img_6759_face.jpg .

Navigatie

phpmultilanguage
Writing /var/www/html/john.de-graaff.net/webroot/wiki/data/cache/2/2b6973632eff8088fd1452229ae9aa9e.xhtml failed

Table of Contents

PHP Multi-Language

lang-en.php
<?php
 define( "WELCOME", "Hello " );
 define( "DAY", ", we wish you a nice day." );
?>

lang-ro.php
<?php
 define( "WELCOME", "Salut " );
 define( "DAY", ", iti dorim o zi placuta." );
?>

<?php
require_once( "/lang-$_SESSION[lang]" );
?>

<div><? echo "WELCOME" . $login . "DAY" ?></div>
<!-- this should output, for English, : 
Hello John, we wish you a nice day. -->
/var/www/html/john.de-graaff.net/webroot/wiki/data/pages/phpmultilanguage.txt ยท Last modified: 2019/03/06 07:33 (external edit)