Sample> Testif

<?php

// include TPLN
include('TPLN/TPLN.php');

$TPLN = new TPLN;

// echo  $_SERVER['HTTP_ACCEPT_LANGUAGE'];

// detect lang with browser
$langs explode(','$_SERVER['HTTP_ACCEPT_LANGUAGE']);

$_lang "";
if(
count($langs) >= 1)
    
$_lang $langs[0];

$TPLN->open("testif.html");
$TPLN->write();

?>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>Test if</title>
  <link href="../style.css" rel="stylesheet" type="text/css" />
</head>

<body>

{#if($_lang == 'fr' || $_lang == 'FR-fr')}
    Bienvenue (FR detected)
{#elseif($_lang == 'en' || $_lang == 'EN-en')}
    Welcome  (EN detected)
{#else}
    Lang not detected
{#endif}


</body>
</html>