#20 Fixed multi-language support

merge-requests/2/head v1.2.2
Mike Koch 10 years ago
parent 136d991b3a
commit dc57fceab3

@ -903,12 +903,18 @@ function hesk_msgToPlain($msg, $specialchars=0, $strip=1)
function hesk_showTopBar($page_title)
{
echo $page_title;
} // END hesk_showTopBar()
function hesk_getLanguagesAsFormIfNecessary()
{
global $hesk_settings, $hesklang;
if ($hesk_settings['can_sel_lang'])
{
$str = '<form method="get" action="" style="margin:0;padding:0;border:0;white-space:nowrap;">';
$str = '<form method="get" action="" role="form" style="margin:0;padding:0;border:0;white-space:nowrap;">';
if ( ! isset($_GET) )
{
@ -924,15 +930,11 @@ function hesk_showTopBar($page_title)
$str .= '<input type="hidden" name="'.hesk_htmlentities($k).'" value="'.hesk_htmlentities($v).'" />';
}
$str .= '<select name="language" onchange="this.form.submit()">';
$str .= '<select name="language" class="form-control" onchange="this.form.submit()">';
$str .= hesk_listLanguages(0);
$str .= '</select>';
$str .= '</select><br/>';
?>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td class="headersm" style="padding-left: 0px;"><?php echo $page_title; ?></td>
<td class="headersm" style="padding-left: 0px;text-align: right">
<script language="javascript" type="text/javascript">
document.write('<?php echo str_replace(array('"','<','=','>'),array('\42','\74','\75','\76'),$str . '</form>'); ?>');
</script>
@ -941,16 +943,9 @@ function hesk_showTopBar($page_title)
echo $str . '<input type="submit" value="'.$hesklang['go'].'" /></form>';
?>
</noscript>
</td>
</tr>
</table>
<?php
}
else
{
echo $page_title;
}
} // END hesk_showTopBar()
function hesk_listLanguages($doecho = 1) {

@ -110,6 +110,14 @@ function print_add_ticket()
</ul>
<div class="summaryList">
<div class="viewTicketSidebar">
<div class="row">
<div class="col-md-6 col-xs-12">
<label class="control-label" style="margin-top:8px;"><?php echo $hesklang['changeLanguage']; ?></label>
</div>
<div class="col-md-6 col-xs-12">
<?php echo hesk_getLanguagesAsFormIfNecessary(); ?>
</div>
</div>
<p><?php echo $hesklang['quick_help_submit_ticket']; ?></p>
</div>
</div>

@ -21,6 +21,9 @@ $hesklang['_COLLATE']='utf8_unicode_ci';
// This is the email break line that will be used in email piping
$hesklang['EMAIL_HR']='------ Reply above this line ------';
// ADDED OR MODIFIED IN NuMods 1.2.2
$hesklang['changeLanguage'] = 'Change language to';
// ADDED OR MODIFIED IN NuMods 1.2
$hesklang['statuses'] = 'Statuses';
$hesklang['basicProperties'] = 'Basic Properties';

@ -14,6 +14,6 @@ $nuMods_settings['dropdownItemTextHoverBackgroundColor'] = '#f5f5f5';
$nuMods_settings['questionMarkColor'] = '#000000';
/* DO NOT EDIT ANYTHING BELOW THIS LINE */
$nuMods_settings['version']='1.2.1';
$nuMods_settings['version']='1.2.2';
?>

@ -216,6 +216,14 @@ require_once(HESK_PATH . 'inc/header.inc.php');
</ul>
<div class="summaryList">
<div class="viewTicketSidebar">
<div class="row">
<div class="col-md-6 col-xs-12">
<label class="control-label" style="margin-top:8px;"><?php echo $hesklang['changeLanguage']; ?></label>
</div>
<div class="col-md-6 col-xs-12">
<?php echo hesk_getLanguagesAsFormIfNecessary(); ?>
</div>
</div>
<p><?php echo $hesklang['quick_help_ticket']; ?></p>
</div>
</div>

Loading…
Cancel
Save