summaryrefslogtreecommitdiffstats
path: root/libs/Language.php
diff options
context:
space:
mode:
authorBigCoke233 <hi@guhub.cn>2020-07-30 23:49:46 +0800
committerBigCoke233 <hi@guhub.cn>2020-07-30 23:49:46 +0800
commit52ab9c1909f39c8854e8235cddd351ef72505e91 (patch)
tree0d8de56dc167919197d9567578430c106e996c1e /libs/Language.php
parent23c8e8fed64c5995101cc9ceb08706d8849b0a3c (diff)
:fire: Del: 移除旧版本所有文件,准备 2.0 版本
Diffstat (limited to 'libs/Language.php')
-rw-r--r--libs/Language.php41
1 files changed, 0 insertions, 41 deletions
diff --git a/libs/Language.php b/libs/Language.php
deleted file mode 100644
index d24ae77..0000000
--- a/libs/Language.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-if (!defined('__TYPECHO_ROOT_DIR__')) exit;
-
-/**
- * Language.php
- * 多语言 / 多語言 / Multi-Languages
- *
- * Author: Eltrac(BigCoke233)
- * License: MIT
- */
-
-class Lang
-{
- public static function getLang() {
- $provided_lang = glob(Helper::options()->themeFile("lang/*.php"));
- if(in_array($GLOBALS['miraclesLang'].'.php', $provided_lang)){
- require_once("lang/"+$GLOBALS['miraclesLang'].".php");
- $GLOBALS['miraclesLangError']=false;
- }else{
- require_once("lang/zh-cn.php");
- $GLOBALS['miraclesLangError']=true;
- }
- }
-}
-
-//快速获取对应语言文本
-function gt($a, $b) {
- return $GLOBALS[$a][$b];
-}
-function gtecho($a, $b) {
- echo $GLOBALS[$a][$b];
-}
-//有参数的文本获取
-function gta($a, $b, $c) {
- $content = str_replace('%s', $c, $GLOBALS[$a][$b]);
- return $content;
-}
-function gtaecho($a, $b, $c) {
- $content = str_replace('%s', $c, $GLOBALS[$a][$b]);
- echo $content;
-} \ No newline at end of file