Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

display_multilingual_text_field()

Parameters

ColumnTypeDefaultDescription
$n
$field
$translations

Location

include/render_functions.php lines 1479 to 1515

Definition

 
function display_multilingual_text_field($n$field$translations)
  {
  global 
$language$languages$lang;
  
?>
  <p><a href="#" class="OptionToggle" onClick="l=document.getElementById('LanguageEntry_ echo $n?>');if (l.style.display=='block') {l.style.display='none';this.innerHTML=' echo $lang["showtranslations"]?>';} else {l.style.display='block';this.innerHTML=' echo $lang["hidetranslations"]?>';} return false;"> echo $lang["showtranslations"]?></a></p>
  <table class="OptionTable" style="display:none;" id="LanguageEntry_ echo $n?>">
     
     reset
($languages);
     foreach (
$languages as $langkey => $langname)
     {
       if (
$language!=$langkey)
       {
         if (
array_key_exists($langkey,$translations)) {$transval=$translations[$langkey];} else {$transval="";}
         
?>
         <tr>
            <td nowrap valign="top"> echo htmlspecialchars($langname)?>&nbsp;&nbsp;</td>

            
            
if ($field["type"]==0)
            {
              
?>
              <td><input type="text" class="stdwidth" name="multilingual_ echo $n?>_ echo $langkey?>" value=" echo htmlspecialchars($transval)?>"></td>
              
           
}
           else
           {
              
?>
              <td><textarea rows=6 cols=50 name="multilingual_ echo $n?>_ echo $langkey?>"> echo htmlspecialchars($transval)?></textarea></td>
              
           
}
           
?>
        </tr>
        
     
}
  }
  
?></table>
  
}

This article was last updated 12th July 2020 01:35 Europe/London time based on the source file dated 8th July 2020 11:40 Europe/London time.