PluginProbe
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster / 1.2.1
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster v1.2.1
2.7.0 2.6.0 trunk 1.1.0 1.1.4 1.2.1 1.2.2 1.2.3 1.2.5 1.2.9 1.3.1 1.3.2 1.5.0 1.5.1 1.5.4 1.5.7 1.5.8 1.5.9 1.6.2 1.6.5 1.6.8 1.7.2 1.7.4 1.7.5 1.7.9 All 43 releases
sellkit / includes / contact-segmentation / conditions / browser-language.php

browser-language.php in SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster 1.2.1, at includes/contact-segmentation/conditions/browser-language.php

308 lines 9.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Sellkit\Contact_Segmentation\Conditions;
4
5 use Sellkit\Contact_Segmentation\Conditions\Condition_Base;
6
7 defined( 'ABSPATH' ) || die();
8
9 /**
10 * Class Browser_Language_Condition
11 *
12 * @package Sellkit\Contact_Segmentation\Conditions
13 * @since 1.1.0
14 */
15 class Browser_Language extends Condition_Base {
16
17 /**
18 * Condition name.
19 *
20 * @since 1.1.0
21 */
22 public function get_name() {
23 return 'browser-language';
24 }
25
26 /**
27 * Condition title.
28 *
29 * @since 1.1.0
30 */
31 public function get_title() {
32 return __( 'Browser Language', 'sellkit' );
33 }
34
35 /**
36 * Condition type.
37 *
38 * @since 1.1.0
39 */
40 public function get_type() {
41 return self::SELLKIT_DROP_DOWN_CONDITION_VALUE;
42 }
43
44 /**
45 * Get the options
46 *
47 * @since 1.1.0
48 * @return string[]
49 */
50 public function get_options() {
51 // It's from here http://www.lingoes.net/en/translator/langcode.htm.
52 return [
53 'aa-DJ' => 'Afar (Djibouti)',
54 'aa-ER' => 'Afar (Eritrea)',
55 'aa-ET' => 'Afar (Ethiopia)',
56 'af-ZA' => 'Afrikaans (South Africa)',
57 'sq-AL' => 'Albanian (Albania)',
58 'sq-MK' => 'Albanian (Macedonia)',
59 'am-ET' => 'Amharic (Ethiopia)',
60 'ar-DZ' => 'Arabic (Algeria)',
61 'ar-BH' => 'Arabic (Bahrain)',
62 'ar-EG' => 'Arabic (Egypt)',
63 'ar-IN' => 'Arabic (India)',
64 'ar-IQ' => 'Arabic (Iraq)',
65 'ar-JO' => 'Arabic (Jordan)',
66 'ar-KW' => 'Arabic (Kuwait)',
67 'ar-LB' => 'Arabic (Lebanon)',
68 'ar-LY' => 'Arabic (Libya)',
69 'ar-MA' => 'Arabic (Morocco)',
70 'ar-OM' => 'Arabic (Oman)',
71 'ar-QA' => 'Arabic (Qatar)',
72 'ar-SA' => 'Arabic (Saudi Arabia)',
73 'ar-SD' => 'Arabic (Sudan)',
74 'ar-SY' => 'Arabic (Syria)',
75 'ar-TN' => 'Arabic (Tunisia)',
76 'ar-AE' => 'Arabic (United Arab Emirates)',
77 'ar-YE' => 'Arabic (Yemen)',
78 'an-ES' => 'Aragonese (Spain)',
79 'hy-AM' => 'Armenian (Armenia)',
80 'as-IN' => 'Assamese (India)',
81 'ast-ES' => 'Asturian (Spain)',
82 'az-AZ' => 'Azerbaijani (Azerbaijan)',
83 'az-TR' => 'Azerbaijani (Turkey)',
84 'eu-FR' => 'Basque (France)',
85 'eu-ES' => 'Basque (Spain)',
86 'be-BY' => 'Belarusian (Belarus)',
87 'bem-ZM' => 'Bemba (Zambia)',
88 'bn-BD' => 'Bengali (Bangladesh)',
89 'bn-IN' => 'Bengali (India)',
90 'ber-DZ' => 'Berber (Algeria)',
91 'ber-MA' => 'Berber (Morocco)',
92 'byn-ER' => 'Blin (Eritrea)',
93 'bs-BA' => 'Bosnian (Bosnia and Herzegovina)',
94 'br-FR' => 'Breton (France)',
95 'bg-BG' => 'Bulgarian (Bulgaria)',
96 'my-MM' => 'Burmese (Myanmar [Burma])',
97 'ca-AD' => 'Catalan (Andorra)',
98 'ca-FR' => 'Catalan (France)',
99 'ca-IT' => 'Catalan (Italy)',
100 'ca-ES' => 'Catalan (Spain)',
101 'zh-CN' => 'Chinese (China)',
102 'zh-HK' => 'Chinese (Hong Kong SAR China)',
103 'zh-SG' => 'Chinese (Singapore)',
104 'zh-TW' => 'Chinese (Taiwan)',
105 'cv-RU' => 'Chuvash (Russia)',
106 'kw-GB' => 'Cornish (United Kingdom)',
107 'crh-UA' => 'Crimean Turkish (Ukraine)',
108 'hr-HR' => 'Croatian (Croatia)',
109 'cs-CZ' => 'Czech (Czech Republic)',
110 'da-DK' => 'Danish (Denmark)',
111 'dv-MV' => 'Divehi (Maldives)',
112 'nl-AW' => 'Dutch (Aruba)',
113 'nl-BE' => 'Dutch (Belgium)',
114 'nl-NL' => 'Dutch (Netherlands)',
115 'dz-BT' => 'Dzongkha (Bhutan)',
116 'en-AG' => 'English (Antigua and Barbuda)',
117 'en-AU' => 'English (Australia)',
118 'en-BW' => 'English (Botswana)',
119 'en-CA' => 'English (Canada)',
120 'en-DK' => 'English (Denmark)',
121 'en-HK' => 'English (Hong Kong SAR China)',
122 'en-IN' => 'English (India)',
123 'en-IE' => 'English (Ireland)',
124 'en-NZ' => 'English (New Zealand)',
125 'en-NG' => 'English (Nigeria)',
126 'en-PH' => 'English (Philippines)',
127 'en-SG' => 'English (Singapore)',
128 'en-ZA' => 'English (South Africa)',
129 'en-GB' => 'English (United Kingdom)',
130 'en-US' => 'English (United States)',
131 'en-ZM' => 'English (Zambia)',
132 'en-ZW' => 'English (Zimbabwe)',
133 'eo' => 'Esperanto',
134 'et-EE' => 'Estonian (Estonia)',
135 'fo-FO' => 'Faroese (Faroe Islands)',
136 'fil-PH' => 'Filipino (Philippines)',
137 'fi-FI' => 'Finnish (Finland)',
138 'fr-BE' => 'French (Belgium)',
139 'fr-CA' => 'French (Canada)',
140 'fr-FR' => 'French (France)',
141 'fr-LU' => 'French (Luxembourg)',
142 'fr-CH' => 'French (Switzerland)',
143 'fur-IT' => 'Friulian (Italy)',
144 'ff-SN' => 'Fulah (Senegal)',
145 'gl-ES' => 'Galician (Spain)',
146 'lg-UG' => 'Ganda (Uganda)',
147 'gez-ER' => 'Geez (Eritrea)',
148 'gez-ET' => 'Geez (Ethiopia)',
149 'ka-GE' => 'Georgian (Georgia)',
150 'de-AT' => 'German (Austria)',
151 'de-BE' => 'German (Belgium)',
152 'de-DE' => 'German (Germany)',
153 'de-LI' => 'German (Liechtenstein)',
154 'de-LU' => 'German (Luxembourg)',
155 'de-CH' => 'German (Switzerland)',
156 'el-CY' => 'Greek (Cyprus)',
157 'el-GR' => 'Greek (Greece)',
158 'gu-IN' => 'Gujarati (India)',
159 'ht-HT' => 'Haitian (Haiti)',
160 'ha-NG' => 'Hausa (Nigeria)',
161 'iw-IL' => 'Hebrew (Israel)',
162 'he-IL' => 'Hebrew (Israel)',
163 'hi-IN' => 'Hindi (India)',
164 'hu-HU' => 'Hungarian (Hungary)',
165 'is-IS' => 'Icelandic (Iceland)',
166 'ig-NG' => 'Igbo (Nigeria)',
167 'id-ID' => 'Indonesian (Indonesia)',
168 'ia' => 'Interlingua',
169 'iu-CA' => 'Inuktitut (Canada)',
170 'ik-CA' => 'Inupiaq (Canada)',
171 'ga-IE' => 'Irish (Ireland)',
172 'it-IT' => 'Italian (Italy)',
173 'it-CH' => 'Italian (Switzerland)',
174 'ja-JP' => 'Japanese (Japan)',
175 'kl-GL' => 'Kalaallisut (Greenland)',
176 'kn-IN' => 'Kannada (India)',
177 'ks-IN' => 'Kashmiri (India)',
178 'csb-PL' => 'Kashubian (Poland)',
179 'kk-KZ' => 'Kazakh (Kazakhstan)',
180 'km-KH' => 'Khmer (Cambodia)',
181 'rw-RW' => 'Kinyarwanda (Rwanda)',
182 'ky-KG' => 'Kirghiz (Kyrgyzstan)',
183 'kok-IN' => 'Konkani (India)',
184 'ko-KR' => 'Korean (South Korea)',
185 'ku-TR' => 'Kurdish (Turkey)',
186 'lo-LA' => 'Lao (Laos)',
187 'lv-LV' => 'Latvian (Latvia)',
188 'li-BE' => 'Limburgish (Belgium)',
189 'li-NL' => 'Limburgish (Netherlands)',
190 'lt-LT' => 'Lithuanian (Lithuania)',
191 'nds-DE' => 'Low German (Germany)',
192 'nds-NL' => 'Low German (Netherlands)',
193 'mk-MK' => 'Macedonian (Macedonia)',
194 'mai-IN' => 'Maithili (India)',
195 'mg-MG' => 'Malagasy (Madagascar)',
196 'ms-MY' => 'Malay (Malaysia)',
197 'ml-IN' => 'Malayalam (India)',
198 'mt-MT' => 'Maltese (Malta)',
199 'gv-GB' => 'Manx (United Kingdom)',
200 'mi-NZ' => 'Maori (New Zealand)',
201 'mr-IN' => 'Marathi (India)',
202 'mn-MN' => 'Mongolian (Mongolia)',
203 'ne-NP' => 'Nepali (Nepal)',
204 'se-NO' => 'Northern Sami (Norway)',
205 'nso-ZA' => 'Northern Sotho (South Africa)',
206 'nb-NO' => 'Norwegian Bokmål (Norway)',
207 'nn-NO' => 'Norwegian Nynorsk (Norway)',
208 'oc-FR' => 'Occitan (France)',
209 'or-IN' => 'Oriya (India)',
210 'om-ET' => 'Oromo (Ethiopia)',
211 'om-KE' => 'Oromo (Kenya)',
212 'os-RU' => 'Ossetic (Russia)',
213 'pap-AN' => 'Papiamento (Netherlands Antilles)',
214 'ps-AF' => 'Pashto (Afghanistan)',
215 'fa-IR' => 'Persian (Iran)',
216 'pl-PL' => 'Polish (Poland)',
217 'pt-BR' => 'Portuguese (Brazil)',
218 'pt-PT' => 'Portuguese (Portugal)',
219 'pa-IN' => 'Punjabi (India)',
220 'pa-PK' => 'Punjabi (Pakistan)',
221 'ro-RO' => 'Romanian (Romania)',
222 'ru-RU' => 'Russian (Russia)',
223 'ru-UA' => 'Russian (Ukraine)',
224 'sa-IN' => 'Sanskrit (India)',
225 'sc-IT' => 'Sardinian (Italy)',
226 'gd-GB' => 'Scottish Gaelic (United Kingdom)',
227 'sr-ME' => 'Serbian (Montenegro)',
228 'sr-RS' => 'Serbian (Serbia)',
229 'sid-ET' => 'Sidamo (Ethiopia)',
230 'sd-IN' => 'Sindhi (India)',
231 'si-LK' => 'Sinhala (Sri Lanka)',
232 'sk-SK' => 'Slovak (Slovakia)',
233 'sl-SI' => 'Slovenian (Slovenia)',
234 'so-DJ' => 'Somali (Djibouti)',
235 'so-ET' => 'Somali (Ethiopia)',
236 'so-KE' => 'Somali (Kenya)',
237 'so-SO' => 'Somali (Somalia)',
238 'nr-ZA' => 'South Ndebele (South Africa)',
239 'st-ZA' => 'Southern Sotho (South Africa)',
240 'es-AR' => 'Spanish (Argentina)',
241 'es-BO' => 'Spanish (Bolivia)',
242 'es-CL' => 'Spanish (Chile)',
243 'es-CO' => 'Spanish (Colombia)',
244 'es-CR' => 'Spanish (Costa Rica)',
245 'es-DO' => 'Spanish (Dominican Republic)',
246 'es-EC' => 'Spanish (Ecuador)',
247 'es-SV' => 'Spanish (El Salvador)',
248 'es-GT' => 'Spanish (Guatemala)',
249 'es-HN' => 'Spanish (Honduras)',
250 'es-MX' => 'Spanish (Mexico)',
251 'es-NI' => 'Spanish (Nicaragua)',
252 'es-PA' => 'Spanish (Panama)',
253 'es-PY' => 'Spanish (Paraguay)',
254 'es-PE' => 'Spanish (Peru)',
255 'es-ES' => 'Spanish (Spain)',
256 'es-US' => 'Spanish (United States)',
257 'es-UY' => 'Spanish (Uruguay)',
258 'es-VE' => 'Spanish (Venezuela)',
259 'sw-KE' => 'Swahili (Kenya)',
260 'sw-TZ' => 'Swahili (Tanzania)',
261 'ss-ZA' => 'Swati (South Africa)',
262 'sv-FI' => 'Swedish (Finland)',
263 'sv-SE' => 'Swedish (Sweden)',
264 'tl-PH' => 'Tagalog (Philippines)',
265 'tg-TJ' => 'Tajik (Tajikistan)',
266 'ta-IN' => 'Tamil (India)',
267 'tt-RU' => 'Tatar (Russia)',
268 'te-IN' => 'Telugu (India)',
269 'th-TH' => 'Thai (Thailand)',
270 'bo-CN' => 'Tibetan (China)',
271 'bo-IN' => 'Tibetan (India)',
272 'tig-ER' => 'Tigre (Eritrea)',
273 'ti-ER' => 'Tigrinya (Eritrea)',
274 'ti-ET' => 'Tigrinya (Ethiopia)',
275 'ts-ZA' => 'Tsonga (South Africa)',
276 'tn-ZA' => 'Tswana (South Africa)',
277 'tr-CY' => 'Turkish (Cyprus)',
278 'tr-TR' => 'Turkish (Turkey)',
279 'tk-TM' => 'Turkmen (Turkmenistan)',
280 'ug-CN' => 'Uighur (China)',
281 'uk-UA' => 'Ukrainian (Ukraine)',
282 'hsb-DE' => 'Upper Sorbian (Germany)',
283 'ur-PK' => 'Urdu (Pakistan)',
284 'uz-UZ' => 'Uzbek (Uzbekistan)',
285 've-ZA' => 'Venda (South Africa)',
286 'vi-VN' => 'Vietnamese (Vietnam)',
287 'wa-BE' => 'Walloon (Belgium)',
288 'cy-GB' => 'Welsh (United Kingdom)',
289 'fy-DE' => 'Western Frisian (Germany)',
290 'fy-NL' => 'Western Frisian (Netherlands)',
291 'wo-SN' => 'Wolof (Senegal)',
292 'xh-ZA' => 'Xhosa (South Africa)',
293 'yi-US' => 'Yiddish (United States)',
294 'yo-NG' => 'Yoruba (Nigeria)',
295 'zu-ZA' => 'Zulu (South Africa)',
296 ];
297 }
298
299 /**
300 * It is pro feature or not.
301 *
302 * @since 1.1.0
303 */
304 public function is_pro() {
305 return false;
306 }
307 }
308