Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

display_multilingual_text_field()

Parameters

ColumnTypeDefaultDescription
$n
$field
$translations

Location

include/render_functions.php lines 1779 to 1815

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 escape($lang["showtranslations"])?>';} else {l.style.display='block';this.innerHTML=' echo escape($lang["hidetranslations"])?>';} return false;"> echo escape($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 escape($langname)?>&nbsp;&nbsp;</td>

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

This article was last updated 28th March 2024 11:05 Europe/London time based on the source file dated 28th March 2024 11:05 Europe/London time.