diff --git a/include/ajax.config.php b/include/ajax.config.php index 6b67e1a1a0d1239f5b4d343d957aa02bc7e336da..28ada22308fdd38fba64acca90ae403069a67b68 100644 --- a/include/ajax.config.php +++ b/include/ajax.config.php @@ -20,7 +20,10 @@ class ConfigAjaxAPI extends AjaxController { //config info UI might need. function scp() { - global $cfg, $thisstaff; + global $cfg; + + $lang = Internationalization::getCurrentLanguage(); + list($sl, $locale) = explode('_', $lang); $config=array( 'lock_time' => ($cfg->getLockTime()*3600), @@ -28,7 +31,8 @@ class ConfigAjaxAPI extends AjaxController { 'html_thread' => (bool) $cfg->isHtmlThreadEnabled(), 'date_format' => ($cfg->getDateFormat()), 'allow_attachments' => (bool) $cfg->allowAttachments(), - 'lang' => $thisstaff->getLanguage(), + 'lang' => $lang, + 'short_lang' => $sl, ); return $this->json_encode($config); } diff --git a/include/staff/tpl.inc.php b/include/staff/tpl.inc.php index e5db2eb1d30450b0a1799d647e12d28f5c7c05c4..d8c26e6083d869ea76a025d2ded88a5b3b2d8bd6 100644 --- a/include/staff/tpl.inc.php +++ b/include/staff/tpl.inc.php @@ -59,12 +59,12 @@ $tpl=$msgtemplates[$selected]; echo "</optgroup>"; $current_group = $nfo['group']; ?> <optgroup label="<?php echo isset($_groups[$current_group]) - ? $_groups[$current_group] : $current_group; ?>"> + ? __($_groups[$current_group]) : $current_group; ?>"> <?php } $sel=($selected==$cn)?'selected="selected"':''; echo sprintf('<option value="%s" %s>%s</option>', isset($impl[$cn]) ? $impl[$cn]->getId() : $cn, - $sel,$nfo['name']); + $sel,__($nfo['name'])); } if ($current_group) echo "</optgroup>"; @@ -86,10 +86,10 @@ $tpl=$msgtemplates[$selected]; <div style="border:1px solid #ccc;background:#f0f0f0;padding:5px 10px; margin:10px 0;"> -<h3 style="font-size:12pt;margin:0"><?php echo $desc['name']; ?> +<h3 style="font-size:12pt;margin:0"><?php echo __($desc['name']); ?> <i class="help-tip icon-question-sign" - data-content="<?php echo Format::htmlchars($desc['desc']); ?>" - data-title="<?php echo Format::htmlchars($desc['name']); ?>"></i> + data-content="<?php echo Format::htmlchars(__($desc['desc'])); ?>" + data-title="<?php echo Format::htmlchars(__($desc['name'])); ?>"></i> <a style="font-size:10pt" class="tip pull-right" href="#ticket_variables.txt"> <i class="icon-tags"></i> <?php echo __('Supported Variables'); ?></a> diff --git a/include/staff/user-view.inc.php b/include/staff/user-view.inc.php index 28352816692b1a65301674c1e892618322ac536c..34c7c212ce3d93d2290c3be1454f7a78ba4e954c 100644 --- a/include/staff/user-view.inc.php +++ b/include/staff/user-view.inc.php @@ -14,7 +14,7 @@ $org = $user->getOrganization(); </td> <td width="50%" class="right_align has_bottom_border"> <span class="action-button" data-dropdown="#action-dropdown-more"> - <span ><i class="icon-cog"></i> More</span> + <span ><i class="icon-cog"></i> <?php echo __('More'); ?></span> <i class="icon-caret-down"></i> </span> <a id="user-delete" class="action-button user-action"