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


PHP language::set方法代码示例

本文整理汇总了PHP中language::set方法的典型用法代码示例。如果您正苦于以下问题:PHP language::set方法的具体用法?PHP language::set怎么用?PHP language::set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在language的用法示例。


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

示例1: language

    function create_plugin_instance() {
      global $oLang, $aLang;

      if (!isset($_SESSION['language']) || isset($_GET['language'])) {

        MyOOS_CoreApi::requireOnce('classes/class_language.php');

        $oLang = new language();

        if (isset($_GET['language']) && !empty($_GET['language'])) {
          $oLang->set($_GET['language']);
        } else {
          $oLang->get_browser_language();
        }
      }

      return true;

    }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:19,代码来源:oos_event_language.php

示例2: oosDBGetConn

 function create_plugin_instance()
 {
     global $oLang, $aLang;
     $dbconn =& oosDBGetConn();
     $oostable =& oosDBGetTables();
     $aPages = oos_get_pages();
     if (!isset($_SESSION['language']) || isset($_GET['language'])) {
         MyOOS_CoreApi::requireOnce('classes/class_language.php');
         $oLang = new language();
         if (isset($_GET['language']) && oos_is_not_null($_GET['language'])) {
             $oLang->set($_GET['language']);
         } else {
             $oLang->get_browser_language();
         }
     }
     $sLanguage = oos_var_prep_for_os($_SESSION['language']);
     include 'includes/languages/' . $sLanguage . '.php';
     return true;
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:19,代码来源:oos_event_language.php

示例3: language

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<script type="text/javascript" src="scripts.js"></script>
<?php 
include './function.php';
$lang = new language();
$lang->set('de-de');
$text = new text();
?>
<button onclick="anzeige('form.php?fmet=3')"><?php 
echo $text->view_nq("menu3");
?>
</button>
<button onclick="anzeige('form.php?fmet=1')"><?php 
echo $text->view_nq("menu1");
?>
</button>
<button onclick="anzeige('form.php?fmet=2')"><?php 
echo $text->view_nq("menu2");
?>
</button>
<button onclick="anzeige('form.php?fmet=5')"><?php 
echo $text->view_nq("menu4");
?>
</button>
<button onclick="anzeige('form.php?fmet=6')"><?php 
echo $text->view_nq("menu8");
?>
开发者ID:max2605,项目名称:Katalogsierungsprogamm,代码行数:31,代码来源:index.php

示例4: define

while ($configuration = $configuration_result->fields) {
    define($configuration['cfg_key'], $configuration['cfg_value']);
    // Move that ADOdb pointer!
    $configuration_result->MoveNext();
}
// initialize the logger class
require '../includes/classes/class_logger.php';
// some code to solve compatibility issues
require 'includes/functions/function_compatibility.php';
// language
if (!isset($_SESSION['language']) || isset($_GET['language'])) {
    // require the language class
    require '../includes/classes/class_language.php';
    $oLang = new language();
    if (isset($_GET['language']) && oos_is_not_null($_GET['language'])) {
        $oLang->set($_GET['language']);
    } else {
        $oLang->get_browser_language();
    }
}
// require the language translations
require 'includes/languages/' . $_SESSION['language'] . '.php';
$current_page = split('\\?', basename($_SERVER['PHP_SELF']));
$current_page = $current_page[0];
// for BadBlue(Win32) webserver compatibility
if (file_exists('includes/languages/' . $_SESSION['language'] . '/' . $current_page)) {
    require 'includes/languages/' . $_SESSION['language'] . '/' . $current_page;
}
// define our general functions used application-wide
require 'includes/functions/function_output.php';
require '../includes/functions/function_password.php';
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:31,代码来源:oos_main.php

示例5: view

 function view($tid)
 {
     #Für Quote eine Instanz erzeugen
     $quote = new db();
     #Überprufe ob eine Sprache gesetzt ist wenn nicht standart setzten
     global $standart_lang;
     if (!isset($_COOKIE['lang'])) {
         $lang = new language();
         $lang->set($standart_lang);
     }
     $lang = $_COOKIE['lang'];
     $xml = simplexml_load_file("./lang/{$lang}.xml");
     #Texte werden aus einer XML gelesen. XML ANSI Codiert
     $inhalt_xml = $xml->{$tid};
     $inhalt_xml_q = $quote->quote($inhalt_xml);
     return $inhalt_xml_q;
 }
开发者ID:max2605,项目名称:Katalogsierungsprogamm,代码行数:17,代码来源:function.php


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