added popup insurance search/add
[openemr.git] / library / translation.inc.php
blobf8c0c769a6e53e10513173cd31662ea126b23aaa
1 <?
3 // this function is related to the interface/language module.
5 function xl($constant,$mode='r',$prepend='',$append='') {
6 $lang_id=LANGUAGE;
7 $sql="SELECT * FROM lang_definitions JOIN lang_constants ON lang_definitions.cons_id = lang_constants.cons_id WHERE lang_id='$lang_id' AND constant_name = '$constant' LIMIT 1";
8 $res=SqlStatement($sql);
9 $row=SqlFetchArray($res);
10 $string=$row['definition'];
11 if ($string=='') { $string="$constant"; }
12 $string="$prepend"."$string"."$append";
13 if ($mode=='r'){
14 return $string;
15 } else {
16 echo $string;