<?php
//this code deals with passing parameters
if ($HTTP_POST_VARS) {
foreach(array_keys($HTTP_POST_VARS) as $Var) {
$$Var=$HTTP_POST_VARS[$Var];
};
};
if ($HTTP_GET_VARS) {
foreach(array_keys($HTTP_GET_VARS) as $Var) {
$$Var=$HTTP_GET_VARS[$Var];
};
};
include_once('ult.php'); // include Universal Language Tool library in page code
// language id parameter is stored in $lang
// we have to initialize it if parameter value not passed
if (! $lang) $lang = 'sr';
// create language object, this will also load all language
//definitions stored in -lang directory
$dvl = new ULT;
// now set source language (language that is used to design page) // this is not necessary if you set [is_source_lng] property of rone of the language definitions
$dvl->set_source_language ('sr');
// set display language (language that is actualy used on page)
$dvl->set_display_language ($lang);
// start output buffering. This must be done to allow multilanguage processing
$dvl->block_start();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>ULT Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>
<?php
foreach ($dvl->lang_defs as $m_lang) { $m_lang_name = $m_lang['name']; $m_lang_id = $m_lang['id']; echo "<a href=\"cirilica.php?lang=$m_lang_id#test\">$m_lang_name</a> "; $m_lang = $dvl->$lang_defs[$lang]; }
?>
<p>ПРОБНИ ЈЕЗИЧКИ ПРИМЕР </p>
<p>Језик:
<?php
echo "$m_lang[name] ($lang)" ?>
</p>
<p>Фамилија: <img src="img/lngpic=%25sr=.gif" width="49" height="12"></p>
<p>ОК Прекид Обустава Потврда Боја</p>
<p>А може и било који други текст написан на ћирилици. </p>
</body> </html> <?php
$dvl->block_end()
?>
|