-
Notifications
You must be signed in to change notification settings - Fork 0
/
locale.php
103 lines (101 loc) · 2.06 KB
/
locale.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php
class Locale1 {
public static $lng = array(
"lang" => "",
"refresh" => "",
"back" => "",
"logout" => "",
"write_msg" => "",
"media_att" => "",
"fwd_from" => "",
"history_down" => "",
"history_up" => "",
"phone_number" => "",
"phone_code" => "",
"error" => "",
"reply_from" => "",
"chats" => "",
"login" => "",
"action_pin" => "",
"action_join" => "",
"action_add" => "",
"you" => "",
"phone_code_invalid" => "",
"phone_code_expired" => "",
"settings" => "",
"set_chat_autoupdate" => "",
"set_chat_autoupdate_interval" => "",
"set_language" => "",
"about" => "",
"set_theme" => "",
"set_theme_dark" => "",
"set_theme_light" => "",
"set_chat" => "",
"action_channelcreate" => "",
"action_chateditphoto" => "",
"action_chatedittitle" => "",
"join" => "",
"leave" => "",
"send" => "",
"sending_file" => "",
"send_file" => "",
"set_chats_count" => "",
"size_too_large" => "",
"send_message" => "",
"or" => "",
"choose_sticker" => "",
"reply" => "",
"set_chat_reverse_mode" => "",
"set_chat_autoscroll" => "",
"set_msgs_limit" => "",
"archived_chats" => "",
"reply_to" => "",
"message_to" => "",
"folders" => "",
"all_chats" => "",
"delete" => "",
"forward" => "",
"forward_here" => "",
"actions" => "",
"msg_options" => "",
"wrong_captcha" => "",
"no_pass_code" => "",
"pass_code" => "",
"need_signup" => "",
"password_hash_invalid" => "",
"wrong_number_format" => "",
"html_formatting" => "",
"action_leave" => "",
"action_deleteuser" => "",
"action_joinedbylink" => "",
"action_joinedbyrequest" => "",
"action_historyclear" => "",
"action_chatcreate" => "",
"compactchats" => ""
);
public static function init() {
static::load();
}
public static function load($lang = 'en') {
if(!$lang) {
return false;
}
$x = './locale/' . $lang . '.json';
if(!file_exists($x)) {
return false;
}
$file = file_get_contents($x);
if(!$file) {
return false;
}
$json = json_decode($file, true);
if(!$json) {
return false;
}
foreach($json as $k => $v) {
static::$lng[$k] = $v;
}
return true;
}
}
?>