public static function send_lang($lang)
 {
     $ts = Base_LangCommon::get_langpack($lang, 'custom');
     foreach ($ts as $o => $t) {
         if (!$t) {
             continue;
         }
         Base_Lang_AdministratorCommon::send_translation($lang, $o, $t);
     }
 }
Beispiel #2
0
<?php

/**
 * @author Arkadiusz Bisaga <*****@*****.**>
 * @copyright Copyright &copy; 2008, Telaxus LLC
 * @license MIT
 * @version 1.0
 * @package epesi-lang
 * @subpackage timesheet
 */
if (!isset($_POST['cid']) || !isset($_POST['lang'])) {
    die('alert(\'Invalid request\')');
}
define('JS_OUTPUT', 1);
define('CID', $_POST['cid']);
define('READ_ONLY_SESSION', true);
require_once '../../../../include.php';
ModuleManager::load_modules();
if (!Base_AclCommon::i_am_admin()) {
    die('');
}
$lang = $_POST['lang'];
Base_Lang_AdministratorCommon::send_lang($lang);
Beispiel #3
0
 public function new_lang_pack()
 {
     if ($this->is_back()) {
         return false;
     }
     $url = 'http://forum.epesibim.com/';
     $forum_link = "<a target=\"_blank\" href=\"{$url}\">{$url}</a>";
     $info_msg = __('If you wish to add other language or dialect of existing language, then please contact us via forum: %s', array($forum_link));
     print "<div class=\"important_notice\">{$info_msg}</div>";
     $form = $this->init_module('Libs/QuickForm', __('Creating new langpack...'), 'new_langpack');
     $form->addElement('header', null, __('Create new langpack'));
     $form->addElement('select', 'code', __('Language'), Base_Lang_AdministratorCommon::available_new_languages());
     $form->registerRule('check_if_langpack_exists', 'callback', 'check_if_langpack_exists', $this);
     $form->addRule('code', __('Specified langpack already exists'), 'check_if_langpack_exists');
     $form->addRule('code', __('Field required'), 'required');
     if ($form->validate()) {
         Base_LangCommon::new_langpack($form->exportValue('code'));
         $this->unset_module_variable('action');
         return false;
     }
     Base_ActionBarCommon::add('back', __('Cancel'), $this->create_back_href());
     Base_ActionBarCommon::add('save', __('Save'), $form->get_submit_form_href());
     $form->display();
     return true;
 }
Beispiel #4
0
<?php

/**
 * @author Arkadiusz Bisaga <*****@*****.**>
 * @copyright Copyright &copy; 2008, Telaxus LLC
 * @license MIT
 * @version 1.0
 * @package epesi-lang
 * @subpackage timesheet
 */
if (!isset($_POST['original']) || !isset($_POST['new']) || !isset($_POST['cid'])) {
    die('alert(\'Invalid request\')');
}
define('JS_OUTPUT', 1);
define('CID', $_POST['cid']);
define('READ_ONLY_SESSION', true);
require_once '../../../../include.php';
ModuleManager::load_modules();
if (!Base_AdminCommon::get_access('Base_Lang_Administrator', 'translate')) {
    die('Unauthorized access');
}
$original = $_POST['original'];
$new = $_POST['new'];
$lang = $_SESSION['client']['base_lang_administrator']['currently_translating'];
Base_LangCommon::append_custom($lang, array($original => $new));
Base_Lang_AdministratorCommon::send_translation($lang, $original, $new);