UTF8 encoding support
[openemr.git] / library / translation.inc.php
blob24c5b13e05b199f40c030d87ff403cb8bb1dc510
1 <?php
2 // include_once($GLOBALS['srcdir'] . '/sql.inc');
3 include_once(dirname(__FILE__) . '/sql.inc'); // fixes vulnerability with register_globals
5 // this function is related to the interface/language module.
7 function xl($constant,$mode='r',$prepend='',$append='') {
8 $lang_id=LANGUAGE;
9 $sql="SELECT * FROM lang_definitions JOIN lang_constants ON " .
10 "lang_definitions.cons_id = lang_constants.cons_id WHERE " .
11 "lang_id='$lang_id' AND constant_name = '" .
12 addslashes($constant) . "' LIMIT 1";
13 $res=SqlStatement($sql);
14 $row=SqlFetchArray($res);
15 $string=$row['definition'];
16 if ($string=='') { $string="$constant"; }
17 $string="$prepend"."$string"."$append";
18 if ($mode=='e'){
19 echo $string;
20 } else {
21 return $string;
25 /**
26 HEADER HTML
28 shows some informations for pages html header
30 @param none
31 @return void
33 function html_header_show() {
34 echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> '."\n";