Line | |
---|
1 | <?php
|
---|
2 | /*
|
---|
3 | * XPressME - WordPress for XOOPS
|
---|
4 | *
|
---|
5 | * @copyright XPressME Project http://www.toemon.com
|
---|
6 | * @license http://www.fsf.org/copyleft/gpl.html GNU public license
|
---|
7 | * @author toemon
|
---|
8 | * @package module::xpress
|
---|
9 | */
|
---|
10 | class wpInfo {
|
---|
11 | // The language of XOOPS is set as Key of the array.
|
---|
12 | // The language of WP is set as Value of the array.
|
---|
13 | var $xoops_Lang;
|
---|
14 | var $wp_Lang;
|
---|
15 |
|
---|
16 | var $wp_lang_array = array(
|
---|
17 | 'english' => array(
|
---|
18 | 'wp_lang' =>'en',
|
---|
19 | 'wp_site' =>'http://wordpress.org/',
|
---|
20 | ),
|
---|
21 |
|
---|
22 | 'japanese' => array(
|
---|
23 | 'wp_lang' =>'ja',
|
---|
24 | 'wp_site' =>'http://ja.wordpress.org/',
|
---|
25 | ),
|
---|
26 |
|
---|
27 | 'ja_utf8' => array(
|
---|
28 | 'wp_lang' =>'ja',
|
---|
29 | 'wp_site' =>'http://ja.wordpress.org/',
|
---|
30 | ),
|
---|
31 |
|
---|
32 | 'pt-br_utf8' => array(
|
---|
33 | 'wp_lang' =>'en',
|
---|
34 | 'wp_site' =>'http://br.wordpress.org/',
|
---|
35 | ),
|
---|
36 |
|
---|
37 | // The key(language of XOOPS) of the following lists has not been set yet.
|
---|
38 | 'Afrikaans' => 'af',
|
---|
39 | 'Albanian' => 'al',
|
---|
40 | 'Arabic' => 'ar',
|
---|
41 | 'Bangla' => 'bn_BD',
|
---|
42 | 'Basque' => 'eu',
|
---|
43 | 'Belarusian' => 'be_BY',
|
---|
44 | 'Bosnian' => 'bs_BA',
|
---|
45 | 'Bulgarian' => 'bg_BG',
|
---|
46 | 'Catalan' => 'ca',
|
---|
47 | 'Chinese' => 'zh_CN',
|
---|
48 | 'Hong Kong' => 'zh_HK',
|
---|
49 | 'Taiwan' => 'zh_TW',
|
---|
50 | 'Croatian' => 'hr',
|
---|
51 | 'Czech' => 'cs_CZ',
|
---|
52 | 'Danish' => 'da_DK',
|
---|
53 | 'Dutch' => 'nl_NL',
|
---|
54 | 'Esperanto' => 'eo',
|
---|
55 | 'Estonian' => 'et',
|
---|
56 | 'Faroese' => 'fo',
|
---|
57 | 'Finnish' => 'fi',
|
---|
58 | 'Galician' => 'gl_ES',
|
---|
59 | 'Georgian' => 'ge_GE',
|
---|
60 | 'German' => 'de_DE',
|
---|
61 | 'Greek' => 'el',
|
---|
62 | 'Hebrew' => 'he_IL',
|
---|
63 | 'Hungarian' => 'hu_HU',
|
---|
64 | 'Icelandic' => 'is_IS',
|
---|
65 | 'Indonesian' => 'id_ID',
|
---|
66 | 'Italian' => 'it_IT',
|
---|
67 | 'Khmer' => 'km_KH',
|
---|
68 | 'ko_utf8' => 'ko_KR',
|
---|
69 | 'Latvian' => 'lv',
|
---|
70 | 'Lithuanian' => 'lt_LT',
|
---|
71 | 'Macedonian' => 'mk_MK',
|
---|
72 | 'Malagasy' => 'mg_MG',
|
---|
73 | 'Malay' => 'ms_MY',
|
---|
74 | 'Nias' => 'ni_ID',
|
---|
75 | 'Norwegian' => 'nb_NO',
|
---|
76 | 'Persian' => 'fa_IR',
|
---|
77 | 'Polish' => 'pl_PL',
|
---|
78 | 'European Portuguese' => 'pt_PT',
|
---|
79 | 'Romanian' => 'ro',
|
---|
80 | 'Russian' => 'ru_RU',
|
---|
81 | 'Serbian' => 'sr_RS',
|
---|
82 | 'Sinhala' => 'si_LK',
|
---|
83 | 'Slovak' => 'sk_SK',
|
---|
84 | 'Slovenian' => 'sl_SI',
|
---|
85 | 'Spanish' => 'es_ES',
|
---|
86 | 'Sundanese' => 'su_ID',
|
---|
87 | 'Swedish' => 'sv_SE',
|
---|
88 | 'Tajik' => 'tg',
|
---|
89 | 'Thai' => 'th',
|
---|
90 | 'Turkish' => 'tr',
|
---|
91 | 'Ukrainian' => 'uk',
|
---|
92 | 'Uzbek' => 'uz_UZ',
|
---|
93 | 'Vietnamse' => 'vi',
|
---|
94 | 'Welsh' => 'cy',
|
---|
95 | );
|
---|
96 |
|
---|
97 | public function get_wpLang($xoops_Lang = 'english')
|
---|
98 | {
|
---|
99 | $detect_lang = $this->wp_lang_array[$xoops_Lang]['wp_lang'];
|
---|
100 | if (empty($detect_lang)) return 'en';
|
---|
101 | return $detect_lang;
|
---|
102 | }
|
---|
103 | public function get_download_info()
|
---|
104 | {
|
---|
105 | $check_url = 'http://api.wordpress.org/core/version-check/1.5/?locale='. $this->wp_lang;
|
---|
106 | }
|
---|
107 | }
|
---|
108 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.