当前位置: 首页>>代码示例>>PHP>>正文


PHP lang_get函数代码示例

本文整理汇总了PHP中lang_get函数的典型用法代码示例。如果您正苦于以下问题:PHP lang_get函数的具体用法?PHP lang_get怎么用?PHP lang_get使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了lang_get函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initialize_gui

/**
 * 
 *
 */
function initialize_gui(&$dbHandler, &$argsObj)
{
    $req_spec_mgr = new requirement_spec_mgr($dbHandler);
    $tproject_mgr = new testproject($dbHandler);
    $commandMgr = new reqSpecCommands($dbHandler);
    $gui = $commandMgr->initGuiBean();
    $gui->req_spec_cfg = config_get('req_spec_cfg');
    $gui->req_cfg = config_get('req_cfg');
    // 20100810 - asimon - BUGID 3317: disabled total count of requirements by default
    $gui->external_req_management = $gui->req_cfg->external_req_management == ENABLED ? 1 : 0;
    $gui->grants = new stdClass();
    $gui->grants->req_mgmt = has_rights($db, "mgt_modify_req");
    $gui->req_spec = $req_spec_mgr->get_by_id($argsObj->req_spec_id);
    $gui->req_spec_id = $argsObj->req_spec_id;
    $gui->tproject_name = $argsObj->tproject_name;
    $gui->name = $gui->req_spec['title'];
    $gui->main_descr = lang_get('req_spec_short') . config_get('gui_title_separator_1') . "[{$gui->req_spec['doc_id']}] :: " . $gui->req_spec['title'];
    $gui->refresh_tree = 'no';
    $gui->cfields = $req_spec_mgr->html_table_of_custom_field_values($argsObj->req_spec_id, $argsObj->tproject_id);
    $gui->attachments = getAttachmentInfosFrom($req_spec_mgr, $argsObj->req_spec_id);
    $gui->requirements_count = $req_spec_mgr->get_requirements_count($argsObj->req_spec_id);
    $gui->reqSpecTypeDomain = init_labels($gui->req_spec_cfg->type_labels);
    /* contribution BUGID 2999, show direct link */
    $prefix = $tproject_mgr->getTestCasePrefix($argsObj->tproject_id);
    $gui->direct_link = $_SESSION['basehref'] . 'linkto.php?tprojectPrefix=' . urlencode($prefix) . '&item=reqspec&id=' . urlencode($gui->req_spec['doc_id']);
    return $gui;
}
开发者ID:tamtrong,项目名称:testlink,代码行数:31,代码来源:reqSpecView.php

示例2: reportBugFormTop

    function reportBugFormTop($p_event, $p_project_id)
    {
        # allow to change reporter_id (if access level is higher than defined)
        $t_user_id = auth_get_current_user_id();
        $t_access_level = user_get_access_level($t_user_id, $p_project_id);
        if ($t_access_level >= plugin_config_get('select_threshold')) {
            ?>
		    
			<tr <?php 
            echo helper_alternate_class();
            ?>
>
				<td class="category" width="30%">
					<?php 
            echo lang_get('reporter');
            ?>
				</td>
				<td width="70%">
					<select <?php 
            echo helper_get_tab_index();
            ?>
 name="reporter_id">
						<?php 
            print_reporter_option_list($t_user_id, $p_project_id);
            ?>
					</select>
				</td>
			</tr>
<?php 
        }
    }
开发者ID:bkraul,项目名称:CustomReporter,代码行数:31,代码来源:CustomReporter.php

示例3: print_status_option_list_plugin

function print_status_option_list_plugin($p_select_label, $p_current_value = 0, $p_allow_close = false, $p_project_id = ALL_PROJECTS)
{
    $t_current_auth = access_get_project_level($p_project_id);
    #Changement de la fonction de récupération des statuts
    $t_enum_list = get_status_option_list_plugin($t_current_auth, $p_current_value, true, $p_allow_close, $p_project_id);
    if (count($t_enum_list) > 1) {
        # resort the list into ascending order
        ksort($t_enum_list);
        reset($t_enum_list);
        echo '<select ', helper_get_tab_index(), ' name="' . $p_select_label . '">';
        foreach ($t_enum_list as $key => $val) {
            #On ne veut pas afficher la valeur @0@
            if ($val == '@0@') {
                continue;
            }
            echo '<option value="' . $key . '"';
            check_selected($key, $p_current_value, false);
            #fix 1.3.0
            echo '>' . $val . '</option>';
        }
        echo '</select>';
    } else {
        if (count($t_enum_list) == 1) {
            echo array_pop($t_enum_list);
        } else {
            echo MantisEnum::getLabel(lang_get('status_enum_string'), $p_current_value);
        }
    }
}
开发者ID:nenes25,项目名称:mantisbt_autochangestatus,代码行数:29,代码来源:functions.php

示例4: getDataAndScale

function getDataAndScale(&$dbHandler)
{
    $obj = new stdClass();
    $totals = null;
    $resultsCfg = config_get('results');
    $dataSet = $_SESSION['statistics']['getTopLevelSuites'];
    $mapOfAggregate = $_SESSION['statistics']['getAggregateMap'];
    $obj->canDraw = !is_null($dataSet);
    if ($obj->canDraw) {
        // Process to enable alphabetical order
        foreach ($dataSet as $tsuite) {
            $item_descr[$tsuite['name']] = $tsuite['id'];
        }
        ksort($item_descr);
        foreach ($item_descr as $name => $tsuite_id) {
            $items[] = htmlspecialchars($name);
            $rmap = $mapOfAggregate[$tsuite_id];
            unset($rmap['total']);
            foreach ($rmap as $key => $value) {
                $totals[$key][] = $value;
            }
        }
    }
    $obj->xAxis = new stdClass();
    $obj->xAxis->values = $items;
    $obj->xAxis->serieName = 'Serie8';
    $obj->series_color = null;
    foreach ($totals as $status => $values) {
        $obj->chart_data[] = $values;
        $obj->series_label[] = lang_get($resultsCfg['status_label'][$status]);
        $obj->series_color[] = $resultsCfg['charts']['status_colour'][$status];
    }
    return $obj;
}
开发者ID:viglesiasce,项目名称:tl_RC1,代码行数:34,代码来源:topLevelSuitesBarChart.php

示例5: addIssue

function addIssue($dbHandler, $argsObj, $itsObj)
{
    $opOK = false;
    $msg = '';
    $resultsCfg = config_get('results');
    $tcaseMgr = new testcase($dbHandler);
    $dummy = $tcaseMgr->tree_manager->get_node_hierarchy_info($argsObj->tcversion_id);
    $auditSign = $tcaseMgr->getAuditSignature((object) array('id' => $dummy['parent_id']));
    $exec = current($tcaseMgr->getExecution($argsObj->exec_id, $argsObj->tcversion_id));
    $dummy = $exec['status'];
    if (isset($resultsCfg['code_status'][$exec['status']])) {
        $dummy = $resultsCfg['code_status'][$exec['status']];
    }
    $exec['statusVerbose'] = sprintf(lang_get('issue_exec_result'), $dummy);
    unset($tcaseMgr);
    $signature = sprintf(lang_get('issue_generated_description'), $argsObj->exec_id, $exec['tester_login'], $exec['testplan_name']);
    if ($exec['platform_id'] > 0) {
        $signature .= sprintf(lang_get('issue_platform'), $exec['platform_name']);
    }
    $signature .= sprintf(lang_get('issue_build') . lang_get('execution_ts_iso'), $exec['build_name'], $exec['execution_ts']) . "\n" . $exec['statusVerbose'] . "\n\n" . $exec['execution_notes'];
    $rs = $itsObj->addIssue($auditSign . ' - ' . sprintf(lang_get('execution_ts_iso'), $exec['execution_ts']), $signature);
    if ($rs['status_ok']) {
        $msg = $rs['msg'];
        $opOK = true;
        if (write_execution_bug($dbHandler, $argsObj->exec_id, $rs['id'])) {
            logAuditEvent(TLS("audit_executionbug_added", $rs['id']), "CREATE", $argsObj->exec_id, "executions");
        }
    } else {
        $msg = $rs['msg'];
    }
    return array($opOK, $msg);
}
开发者ID:mokal,项目名称:DCN_TestLink,代码行数:32,代码来源:bugAdd.php

示例6: access_denied

function access_denied()
{
    if (!auth_is_user_authenticated()) {
        if (basename($_SERVER['SCRIPT_NAME']) != 'login_page.php') {
            $t_return_page = $_SERVER['PHP_SELF'];
            if (isset($_SERVER['QUERY_STRING'])) {
                $t_return_page .= '?' . $_SERVER['QUERY_STRING'];
            }
            $t_return_page = string_url(string_sanitize_url($t_return_page));
            print_header_redirect('login_page.php?return=' . $t_return_page);
        }
    } else {
        if (auth_get_current_user_id() == user_get_id_by_name(config_get_global('anonymous_account'))) {
            if (basename($_SERVER['SCRIPT_NAME']) != 'login_page.php') {
                $t_return_page = $_SERVER['PHP_SELF'];
                if (isset($_SERVER['QUERY_STRING'])) {
                    $t_return_page .= '?' . $_SERVER['QUERY_STRING'];
                }
                $t_return_page = string_url(string_sanitize_url($t_return_page));
                echo '<center>';
                echo '<p>' . error_string(ERROR_ACCESS_DENIED) . '</p>';
                print_bracket_link('login_page.php?return=' . $t_return_page, lang_get('click_to_login'));
                echo '<p></p>';
                print_bracket_link('main_page.php', lang_get('proceed'));
                echo '</center>';
            }
        } else {
            echo '<center>';
            echo '<p>' . error_string(ERROR_ACCESS_DENIED) . '</p>';
            print_bracket_link('main_page.php', lang_get('proceed'));
            echo '</center>';
        }
    }
    exit;
}
开发者ID:jin255ff,项目名称:company_website,代码行数:35,代码来源:access_api.php

示例7: twitter_issue_resolved

/**
 * Posts a twitter update when a bug is resolved.
 *
 * @param $p_bug_id The bug id that was resolved.
 * @access public
 */
function twitter_issue_resolved($p_bug_id)
{
    if (!twitter_enabled()) {
        return true;
    }
    $t_bug = bug_get($p_bug_id, false);
    # Do not twitter except fixed issues
    if ($t_bug->resolution < config_get('bug_resolution_fixed_threshold') || $t_bug->resolution >= config_get('bug_resolution_not_fixed_threshold')) {
        return true;
    }
    # Do not twitter private bugs.
    if ($t_bug->view_state != VS_PUBLIC) {
        return true;
    }
    # Do not twitter bugs belonging to private projects.
    if (VS_PRIVATE == project_get_field($t_bug->project_id, 'view_state')) {
        return true;
    }
    $c_bug_id = db_prepare_int($p_bug_id);
    if (is_blank($t_bug->fixed_in_version)) {
        $t_message = sprintf(lang_get('twitter_resolved_no_version'), $c_bug_id, category_full_name($t_bug->category_id, false), $t_bug->summary, user_get_name($t_bug->handler_id));
    } else {
        $t_message = sprintf(lang_get('twitter_resolved'), $c_bug_id, category_full_name($t_bug->category_id, false), $t_bug->summary, user_get_name($t_bug->handler_id), $t_bug->fixed_in_version);
    }
    return twitter_update($t_message);
}
开发者ID:nourchene-benslimane,项目名称:mantisV0,代码行数:32,代码来源:twitter_api.php

示例8: initialize_gui

/**
 * 
 *
 */
function initialize_gui(&$dbHandler, &$argsObj)
{
    $req_spec_mgr = new requirement_spec_mgr($dbHandler);
    $tproject_mgr = new testproject($dbHandler);
    $commandMgr = new reqSpecCommands($dbHandler);
    $gui = $commandMgr->initGuiBean();
    $gui->refreshTree = $argsObj->refreshTree;
    $gui->req_spec_cfg = config_get('req_spec_cfg');
    $gui->req_cfg = config_get('req_cfg');
    $gui->external_req_management = $gui->req_cfg->external_req_management == ENABLED ? 1 : 0;
    $gui->grants = new stdClass();
    $gui->grants->req_mgmt = $argsObj->user->hasRight($dbHandler, "mgt_modify_req", $argsObj->tproject_id);
    $gui->req_spec = $req_spec_mgr->get_by_id($argsObj->req_spec_id);
    $gui->revCount = $req_spec_mgr->getRevisionsCount($argsObj->req_spec_id);
    $gui->req_spec_id = $argsObj->req_spec_id;
    $gui->parentID = $argsObj->req_spec_id;
    $gui->req_spec_revision_id = $gui->req_spec['revision_id'];
    $gui->name = $gui->req_spec['title'];
    $gui->tproject_id = $argsObj->tproject_id;
    $gui->tproject_name = $argsObj->tproject_name;
    $gui->main_descr = lang_get('req_spec_short') . config_get('gui_title_separator_1') . "[{$gui->req_spec['doc_id']}] :: " . $gui->req_spec['title'];
    $gui->refresh_tree = 'no';
    $gui->cfields = $req_spec_mgr->html_table_of_custom_field_values($argsObj->req_spec_id, $gui->req_spec_revision_id, $argsObj->tproject_id);
    $gui->attachments = $req_spec_mgr->getAttachmentInfos($argsObj->req_spec_id);
    $gui->requirements_count = $req_spec_mgr->get_requirements_count($argsObj->req_spec_id);
    $gui->reqSpecTypeDomain = init_labels($gui->req_spec_cfg->type_labels);
    $prefix = $tproject_mgr->getTestCasePrefix($argsObj->tproject_id);
    $gui->direct_link = $_SESSION['basehref'] . 'linkto.php?tprojectPrefix=' . urlencode($prefix) . '&item=reqspec&id=' . urlencode($gui->req_spec['doc_id']);
    $gui->actions = initializeActions($gui);
    return $gui;
}
开发者ID:moraesmv,项目名称:testlink-code,代码行数:35,代码来源:reqSpecView.php

示例9: buildTable

/**
 * 
 *
 */
function buildTable($data, $tproject_id, $show_platforms, $priorityMgmtEnabled)
{
    $key2search = array('testsuite', 'testcase', 'platform', 'priority', 'summary');
    foreach ($key2search as $key) {
        $labels[$key] = lang_get($key);
    }
    $columns[] = array('title_key' => 'testsuite', 'width' => 20);
    $columns[] = array('title_key' => 'testcase', 'width' => 25);
    if ($show_platforms) {
        $columns[] = array('title_key' => 'platform', 'width' => 10);
    }
    if ($priorityMgmtEnabled) {
        $columns[] = array('title_key' => 'priority', 'type' => 'priority', 'width' => 5);
    }
    $columns[] = array('title_key' => 'summary', 'type' => 'text', 'width' => 40);
    $matrix = new tlExtTable($columns, $data, 'tl_table_tc_without_tester');
    $matrix->setGroupByColumnName($labels['testsuite']);
    $matrix->setSortByColumnName($labels['testcase']);
    $matrix->addCustomBehaviour('text', array('render' => 'columnWrap'));
    if ($priorityMgmtEnabled) {
        $matrix->addCustomBehaviour('priority', array('render' => 'priorityRenderer', 'filter' => 'Priority'));
        $matrix->setSortByColumnName($labels['priority']);
    }
    return $matrix;
}
开发者ID:moraesmv,项目名称:testlink-code,代码行数:29,代码来源:testCasesWithoutTester.php

示例10: kanban_ajax_button_bug_change_status

/**
 * Print Change Status to: AJAXified button
 * This code is similar to button_bug_change_status except that the 
 * button is AJAXified.
 * Uses projax.php
 *
 * @param int $p_bug_id
 * @param int $t_project_id
 * @param int $t_user_id
 * @return null
 */
function kanban_ajax_button_bug_change_status($p_bug_id, $t_project_id, $t_user_id)
{
    global $g_projax;
    $t_bug_project_id = bug_get_field($p_bug_id, 'project_id');
    $t_bug_current_state = bug_get_field($p_bug_id, 'status');
    $t_current_access = access_get_project_level($t_bug_project_id);
    $t_enum_list = get_status_option_list($t_current_access, $t_bug_current_state, false, bug_get_field($p_bug_id, 'reporter_id') == auth_get_current_user_id() && ON == config_get('allow_reporter_close'), $t_bug_project_id);
    if (count($t_enum_list) > 0) {
        # resort the list into ascending order after noting the key from the first element (the default)
        $t_default_arr = each($t_enum_list);
        $t_default = $t_default_arr['key'];
        ksort($t_enum_list);
        reset($t_enum_list);
        echo "<div id=\"ajax_statuschange\"><form method=\"post\" id=\"ajax_status_form\" action=\"xmlhttprequest.php\">";
        # CSRF protection not required here - form does not result in modifications
        echo "<input type=\"hidden\" name=\"project_id\" id=\"project_id\" value=\"{$t_project_id}\" />";
        echo "<input type=\"hidden\" name=\"user_id\" id=\"user_id\" value=\"{$t_user_id}\" />";
        echo "<input type=\"hidden\" name=\"entrypoint\" id=\"entrypoint\" value=\"bug_update_status\" />";
        $t_button_text = lang_get('bug_status_to_button');
        // AJAX button options
        $options = array('url' => plugin_page('kanban_ajax_request'), 'with' => true, 'confirm' => lang_get('confirm_change_status'), 'success' => 'location.reload()', 'failure' => 'alert("Error: " ' + request . status + ')');
        echo $g_projax->submit_to_remote('ajax_status', $t_button_text, $options);
        echo " <select name=\"new_status\">";
        # space at beginning of line is important
        foreach ($t_enum_list as $key => $val) {
            echo "<option value=\"{$key}\" ";
            check_selected($key, $t_default);
            echo ">{$val}</option>";
        }
        echo '</select>';
        $t_bug_id = string_attribute($p_bug_id);
        echo "<input type=\"hidden\" name=\"id\" value=\"{$t_bug_id}\" />\n";
        echo "</form></div>\n";
    }
}
开发者ID:aberad,项目名称:MantisKanban,代码行数:46,代码来源:kanban_api.php

示例11: act

function act()
{
    if (isset($_GET['filter_target'])) {
        if (!headers_sent()) {
            header('Content-Type: text/html; charset=' . lang_get('charset'));
        }
        $filter = $_GET['filter_target'];
        $t_functionName = 'print_filter_' . substr($filter, 0, -7);
        echo "<!-- {$filter} -->";
        if (function_exists($t_functionName)) {
            call_user_func($t_functionName);
        } elseif ('custom_field' == substr($filter, 0, 12)) {
            # custom function
            $t_custom_id = substr($filter, 13, -7);
            print_filter_custom_field($t_custom_id);
        } else {
            # error - no function to populate the target (e.g., print_filter_foo)
            ?>
				<span style="color:red;weight:bold;">
					unknown filter (<?php 
            echo $filter;
            ?>
)
				</span>
				<?php 
        }
    } else {
        # error - no filter given
        ?>
			<span style="color:red;weight:bold;">
				no filter selected
			</span>
			<?php 
    }
}
开发者ID:centaurustech,项目名称:BenFund,代码行数:35,代码来源:return_dynamic_filters.php

示例12: initialize_gui

/**
 * 
 *
 */
function initialize_gui(&$dbHandler, $argsObj)
{
    $tproject_mgr = new testproject($dbHandler);
    $itemMgr = new requirement_spec_mgr($dbHandler);
    $commandMgr = new reqSpecCommands($dbHandler);
    $gui = $commandMgr->initGuiBean();
    $gui->itemCfg = config_get('req_spec_cfg');
    $gui->tproject_name = $argsObj->tproject_name;
    $gui->grants = new stdClass();
    $gui->grants->req_mgmt = $argsObj->hasRight($dbHandler, "mgt_modify_req", $argsObj->tproject_id);
    $gui->tcasePrefix = $tproject_mgr->getTestCasePrefix($argsObj->tproject_id);
    $gui->glueChar = config_get('testcase_cfg')->glue_character;
    $gui->pieceSep = config_get('gui_title_separator_1');
    $gui->item_id = $argsObj->item_id;
    $info = $itemMgr->getRevisionByID($gui->item_id, array('decode_user' => true));
    $gui->item = $info;
    $gui->cfields = $itemMgr->html_table_of_custom_field_values(null, $gui->item_id, $argsObj->tproject_id);
    $gui->show_title = false;
    $gui->main_descr = lang_get('req_spec') . $gui->pieceSep . $gui->item['name'];
    $gui->showContextInfo = $argsObj->showContextInfo;
    if ($gui->showContextInfo) {
        $gui->parent_descr = lang_get('req_spec_short') . $gui->pieceSep . $gui->item['name'];
    }
    $gui->itemSpecStatus = null;
    $gui->itemTypeDomain = init_labels($gui->itemCfg->type_labels);
    return $gui;
}
开发者ID:moraesmv,项目名称:testlink-code,代码行数:31,代码来源:reqSpecViewRevision.php

示例13: initializeGui

/**
 * initializeGui
 *
 */
function initializeGui(&$argsObj, &$req_spec_mgr)
{
    $gui = new stdClass();
    $gui->exportTypes = $req_spec_mgr->get_export_file_types();
    $gui->exportType = $argsObj->exportType;
    $gui->scope = $argsObj->scope;
    $gui->tproject_id = $argsObj->tproject_id;
    switch ($argsObj->scope) {
        case 'tree':
            $gui->req_spec['title'] = lang_get('all_reqspecs_in_tproject');
            $gui->req_spec_id = 0;
            $exportFileName = 'all-req.xml';
            break;
        case 'branch':
            $gui->req_spec = $req_spec_mgr->get_by_id($argsObj->req_spec_id);
            $gui->req_spec_id = $argsObj->req_spec_id;
            $exportFileName = $gui->req_spec['title'] . '-req-spec.xml';
            break;
        case 'items':
            $gui->req_spec = $req_spec_mgr->get_by_id($argsObj->req_spec_id);
            $gui->req_spec_id = $argsObj->req_spec_id;
            $exportFileName = $gui->req_spec['title'] . '-child_req.xml';
            break;
    }
    $gui->export_filename = trim($argsObj->export_filename);
    if ($gui->export_filename == "") {
        $gui->export_filename = $exportFileName;
    }
    return $gui;
}
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:34,代码来源:reqExport.php

示例14: html

 /**
  * Returns html string to display
  * @return string
  */
 public function html()
 {
     $t_html = $this->html_start();
     $t_html .= '<div class="action">' . sprintf(lang_get('timeline_issue_created'), user_get_name($this->user_id), string_get_bug_view_link($this->issue_id)) . '</div>';
     $t_html .= $this->html_end();
     return $t_html;
 }
开发者ID:gtn,项目名称:mantisbt,代码行数:11,代码来源:IssueCreatedTimelineEvent.class.php

示例15: login_dialog

function login_dialog()
{
    echo '
    <div class="modal fade" id="login-dialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <form id="login-dialog-form" method="post" class="form-signin" action="/actions/login">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                        <h4 class="modal-title" id="myModalLabel">', lang_get('log_in'), '</h4>
                    </div>
                    <div class="modal-body">
                            <input name="', md5(CONFIG_SITE_NAME . 'USR'), '" type="email" class="form-control" placeholder="', lang_get('email_address'), '" id="login-email-input" required autofocus />
                            <input name="', md5(CONFIG_SITE_NAME . 'PWD'), '" type="password" class="form-control" placeholder="', lang_get('password'), '" id="login-password-input" required />
                            <input type="hidden" name="action" value="login" />
                            <input type="hidden" name="redirect" value="', htmlspecialchars($_SERVER['REQUEST_URI']), '" />
                            <div class="checkbox">
                                <label>
                                    <input type="checkbox" name="remember_me" value="1" checked> ', lang_get('remember_me'), '
                                </label>
                            </div>
                            <a href="reset_password">', lang_get('forgotten_password'), '</a>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">', lang_get('close'), '</button>
                        <button type="submit" class="btn btn-primary" id="login-button">', lang_get('log_in'), '</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    ';
}
开发者ID:aallen,项目名称:mellivora,代码行数:33,代码来源:login_dialog.inc.php


注:本文中的lang_get函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。