當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Translations::load方法代碼示例

本文整理匯總了PHP中Translations::load方法的典型用法代碼示例。如果您正苦於以下問題:PHP Translations::load方法的具體用法?PHP Translations::load怎麽用?PHP Translations::load使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Translations的用法示例。


在下文中一共展示了Translations::load方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: die

        }
        if ($server_ext_prefix[$dbnr] != '') {
            $kga['server_prefix'] = $server_ext_prefix[$dbnr];
        }
    }
}
$database = new Kimai_Database_Mysql($kga);
$database->connect($kga['server_hostname'], $kga['server_database'], $kga['server_username'], $kga['server_password'], $kga['utf8'], $kga['server_type']);
if (!$database->isConnected()) {
    die('Kimai could not connect to database. Check your autoconf.php.');
}
Kimai_Registry::setDatabase($database);
global $translations;
$translations = new Translations($kga);
if ($kga['language'] != 'en') {
    $translations->load($kga['language']);
}
$vars = $database->configuration_get_data();
if (!empty($vars)) {
    $kga['currency_name'] = $vars['currency_name'];
    $kga['currency_sign'] = $vars['currency_sign'];
    $kga['show_sensible_data'] = $vars['show_sensible_data'];
    $kga['show_update_warn'] = $vars['show_update_warn'];
    $kga['check_at_startup'] = $vars['check_at_startup'];
    $kga['show_daySeperatorLines'] = $vars['show_daySeperatorLines'];
    $kga['show_gabBreaks'] = $vars['show_gabBreaks'];
    $kga['show_RecordAgain'] = $vars['show_RecordAgain'];
    $kga['show_TrackingNr'] = $vars['show_TrackingNr'];
    $kga['date_format'][0] = $vars['date_format_0'];
    $kga['date_format'][1] = $vars['date_format_1'];
    $kga['date_format'][2] = $vars['date_format_2'];
開發者ID:jo91,項目名稱:kimai,代碼行數:31,代碼來源:basics.php


注:本文中的Translations::load方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。