fixes for new frame layout
[openemr.git] / library / translation.inc.php
blob67c0df030187848304c1cec1dec40448ff9f6333
1 <?php
2 include_once($GLOBALS['srcdir'] . '/sql.inc');
4 // this function is related to the interface/language module.
6 function xl($constant,$mode='r',$prepend='',$append='') {
7 $lang_id=LANGUAGE;
8 $sql="SELECT * FROM lang_definitions JOIN lang_constants ON " .
9 "lang_definitions.cons_id = lang_constants.cons_id WHERE " .
10 "lang_id='$lang_id' AND constant_name = '" .
11 addslashes($constant) . "' LIMIT 1";
12 $res=SqlStatement($sql);
13 $row=SqlFetchArray($res);
14 $string=$row['definition'];
15 if ($string=='') { $string="$constant"; }
16 $string="$prepend"."$string"."$append";
17 if ($mode=='e'){
18 echo $string;
19 } else {
20 return $string;