本文整理汇总了PHP中language::SetLang方法的典型用法代码示例。如果您正苦于以下问题:PHP language::SetLang方法的具体用法?PHP language::SetLang怎么用?PHP language::SetLang使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类language
的用法示例。
在下文中一共展示了language::SetLang方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: language
include_once './libraries/language.php';
include_once './libraries/workwithdb.php';
include_once './libraries/functions.php';
include_once './frontend/controllers/HomeController.php';
include_once './frontend/controllers/ProductsController.php';
include_once './frontend/controllers/CartController.php';
include_once './frontend/controllers/ContactController.php';
include_once './frontend/controllers/UserController.php';
include_once './frontend/controllers/PromotionController.php';
include_once './frontend/controllers/ReloadController.php';
//Khoi tao doi tuong ngon ngu
$language = new language();
//Thiet lap ngon ngu tuy chon hoac mac dinh
if (isset($_GET['lang'])) {
//Chọn lại
$language->SetLang($_GET['lang']);
} else {
//Mặc định
$language->SetLang(isset($_SESSION['language']) ? $_SESSION['language'] : 'vietnamese');
}
$language->CreateNewSessionLang();
$language->IncludeLangUserUI();
//Create connect to DB
$conn = new workwithdb();
$conn->CreateConnection();
//Bo dinh tuyen cho cac yeu cau tu views
switch (escape(isset($_GET['content']) ? $_GET['content'] : "home")) {
//trang chu mac dinh
case 'home':
GetIndex();
break;