PluginProbe ʕ •ᴥ•ʔ
EmbedPress – PDF Embedder, 3D PDF FlipBook, Google Reviews, YouTube Videos, Upload & Embed PDF documents / 2.4.1
EmbedPress – PDF Embedder, 3D PDF FlipBook, Google Reviews, YouTube Videos, Upload & Embed PDF documents v2.4.1
4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 trunk 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 2.0.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.2.0 2.2.1 2.2.2 2.3.0 2.3.1 2.3.2 2.3.3 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.1.2 3.1.3 3.2.0 3.2.1 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.4.0 3.4.1 3.4.2 3.4.3 3.5.0 3.5.1 3.5.2 3.5.3 3.6.0 3.6.1 3.6.2 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 3.7.0 3.7.1 3.7.2 3.7.3 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 3.9.1 3.9.10 3.9.11 3.9.12 3.9.13 3.9.14 3.9.15 3.9.16 3.9.17 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9 4.0.0 4.0.1 4.0.10 4.0.11 4.0.12 4.0.13 4.0.14 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.0.7 4.0.8 4.0.9 4.1.0 4.1.1 4.1.10 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.2.7 4.2.8 4.2.9 4.3.0 4.3.1 4.4.0 4.4.1 4.4.10 4.4.11 4.4.2 4.4.3 4.4.4 4.4.5 4.4.6 4.4.7 4.4.8 4.4.9 4.5.0 4.5.1
embedpress / EmbedPress / Ends / Back / Settings.php
embedpress / EmbedPress / Ends / Back Last commit date
Handler.php 7 years ago Settings.php 6 years ago index.html 7 years ago
Settings.php
582 lines
1 <?php
2
3 namespace EmbedPress\Ends\Back;
4
5 use EmbedPress\Compatibility;
6
7 (defined( 'ABSPATH' ) && defined( 'EMBEDPRESS_IS_LOADED' )) or die( "No direct script access allowed." );
8
9 /**
10 * Entity that handles the plugin's settings page.
11 *
12 * @package EmbedPress
13 * @subpackage EmbedPress/Ends/Back
14 * @author EmbedPress <help@embedpress.com>
15 * @copyright Copyright (C) 2018 EmbedPress. All rights reserved.
16 * @license GPLv2 or later
17 * @since 1.0.0
18 */
19 class Settings {
20 /**
21 * This class namespace.
22 *
23 * @since 1.0.0
24 * @access private
25 * @static
26 *
27 * @var string $namespace
28 */
29 private static $namespace = '\\EmbedPress\\Ends\\Back\\Settings';
30
31 /**
32 * The plugin's unique identifier.
33 *
34 * @since 1.0.0
35 * @access private
36 * @static
37 *
38 * @var string $identifier
39 */
40 private static $identifier = "plg_embedpress";
41
42 /**
43 * Unique identifier to the plugin's admin settings section.
44 *
45 * @since 1.0.0
46 * @access private
47 * @static
48 *
49 * @var string $sectionAdminIdentifier
50 */
51 private static $sectionAdminIdentifier = "embedpress_options_admin";
52
53 /**
54 * Unique identifier to the plugin's general settings section.
55 *
56 * @since 1.0.0
57 * @access private
58 * @static
59 *
60 * @var string $sectionGroupIdentifier The name of the plugin.
61 */
62 private static $sectionGroupIdentifier = "embedpress";
63
64 /**
65 * Class constructor. This prevents the class being directly instantiated.
66 *
67 * @since 1.0.0
68 */
69 public function __construct() {
70 }
71
72 /**
73 * This prevents the class being cloned.
74 *
75 * @since 1.0.0
76 */
77 public function __clone() {
78 }
79
80 /**
81 * Method that adds an sub-item for EmbedPress to the WordPress Settings menu.
82 *
83 * @since 1.0.0
84 * @static
85 */
86 public static function registerMenuItem() {
87 add_menu_page( 'EmbedPress Settings', 'EmbedPress', 'manage_options', 'embedpress',
88 [ self::$namespace, 'renderForm' ], null, 64 );
89 }
90
91 /**
92 * Method that configures the EmbedPress settings page.
93 *
94 * @since 1.0.0
95 * @static
96 */
97 public static function registerActions() {
98 $activeTab = isset( $_GET['tab'] ) ? strtolower( $_GET['tab'] ) : "";
99 if ( $activeTab !== "embedpress" ) {
100 $action = "embedpress:{$activeTab}:settings:register";
101 } else {
102 $activeTab = "";
103 }
104
105 if ( !empty( $activeTab ) && has_action( $action ) ) {
106 do_action( $action, [
107 'id' => self::$sectionAdminIdentifier,
108 'slug' => self::$identifier,
109 ] );
110 } else {
111 register_setting( self::$sectionGroupIdentifier, self::$sectionGroupIdentifier,
112 [ self::$namespace, "validateForm" ] );
113
114 add_settings_section( self::$sectionAdminIdentifier, '', null, self::$identifier );
115
116 $fieldMap = [];
117 if ( !Compatibility::isWordPress5() || Compatibility::isClassicalEditorActive() ) {
118 $fieldMap = [
119 'enablePluginInAdmin' => [
120 'label' => "Load previews in the admin editor",
121 'section' => "admin",
122 ],
123 'enablePluginInFront' => [
124 'label' => "Load previews in the frontend editor",
125 'section' => "admin",
126 ],
127 'enableGlobalEmbedResize' => [
128 'label' => "Enable Global Embed Dimension",
129 'section' => "admin",
130 ],
131 'enableEmbedResizeWidth' => [
132 'label' => "Embed Iframe Width",
133 'section' => "admin",
134 ],
135 'enableEmbedResizeHeight' => [
136 'label' => "Embed Iframe Height",
137 'section' => "admin",
138 ]
139 ];
140 }
141
142 $fieldMap['forceFacebookLanguage'] = [
143 'label' => "Facebook embed language",
144 'section' => "admin",
145 ];
146
147 foreach ( $fieldMap as $fieldName => $field ) {
148 add_settings_field( $fieldName, $field['label'], [ self::$namespace, "renderField_{$fieldName}" ],
149 self::$identifier, self::${"section" . ucfirst( $field['section'] ) . "Identifier"} );
150 }
151 }
152 }
153
154 /**
155 * Returns true if the plugin is active
156 *
157 * @param string $plugin
158 *
159 * @return boolean
160 */
161 protected static function is_plugin_active( $plugin ) {
162 return is_plugin_active( "{$plugin}/{$plugin}.php" );
163 }
164
165 /**
166 * Returns true if the plugin is installed
167 *
168 * @param string $plugin
169 *
170 * @return boolean
171 */
172 protected static function is_plugin_installed( $plugin ) {
173 return file_exists( plugin_dir_path( EMBEDPRESS_ROOT ) . "{$plugin}/{$plugin}.php" );
174 }
175
176 /**
177 * Method that render the settings's form.
178 *
179 * @since 1.0.0
180 * @static
181 */
182 public static function renderForm() {
183 // Add the color picker css file
184 wp_enqueue_style( 'wp-color-picker' );
185 // Include our custom jQuery file with WordPress Color Picker dependency
186 wp_enqueue_script( 'ep-settings', EMBEDPRESS_URL_ASSETS . 'js/settings.js', [ 'wp-color-picker' ],
187 EMBEDPRESS_VERSION, true );
188
189 $activeTab = isset( $_GET['tab'] ) ? strtolower( $_GET['tab'] ) : "";
190 $settingsFieldsIdentifier = !empty( $activeTab ) ? "embedpress:{$activeTab}" : self::$sectionGroupIdentifier;
191 $settingsSectionsIdentifier = !empty( $activeTab ) ? "embedpress:{$activeTab}" : self::$identifier;
192 ?>
193 <div id="embedpress-settings-wrapper">
194 <header>
195 <h1 class="pressshack-title">
196 <a href="//wordpress.org/plugins/embedpress" target="_blank" rel="noopener noreferrer"
197 title="EmbedPress">
198 EmbedPress
199 </a>
200 </h1>
201 </header>
202
203 <?php settings_errors(); ?>
204 <div>
205 <h2 class="nav-tab-wrapper">
206 <a href="?page=embedpress"
207 class="nav-tab<?php echo $activeTab === 'embedpress' || empty( $activeTab ) ? ' nav-tab-active' : ''; ?> ">
208 General settings
209 </a>
210 <?php do_action( 'embedpress:settings:render:tab', $activeTab ); ?>
211 <?php do_action( 'embedpress_license_tab', $activeTab ); ?>
212
213 </h2>
214
215 <?php if ( $activeTab !== 'addons' ) : ?>
216 <form action="options.php" method="POST" style="padding-bottom: 20px;">
217 <?php settings_fields( $settingsFieldsIdentifier ); ?>
218 <?php do_settings_sections( $settingsSectionsIdentifier ); ?>
219 <?php if ( $activeTab !== 'embedpress_license' ) : ?>
220 <button type="submit" class="button button-primary embedpress-setting-save">Save changes
221 </button>
222 <?php endif; ?>
223 </form>
224 <?php endif; ?>
225 <?php if ( $activeTab == 'embedpress_license' ) : ?>
226 <?php echo do_action( 'embedpress_license' ); ?>
227 <?php endif; ?>
228 </div>
229
230 <footer>
231 <p>
232 <a href="//wordpress.org/support/plugin/embedpress/reviews/#new-post" target="_blank"
233 rel="noopener noreferrer">If you like <strong>EmbedPress</strong> please leave us a <span
234 class="dashicons dashicons-star-filled"></span><span
235 class="dashicons dashicons-star-filled"></span><span
236 class="dashicons dashicons-star-filled"></span><span
237 class="dashicons dashicons-star-filled"></span><span
238 class="dashicons dashicons-star-filled"></span> rating. Thank you!</a>
239 </p>
240 <hr>
241 <nav>
242 <ul>
243 <li>
244 <a href="//embedpress.com" target="_blank" rel="noopener noreferrer"
245 title="About EmbedPress">About</a>
246 </li>
247 <li>
248 <a href="//embedpress.com/docs/sources-support" target="_blank" rel="noopener noreferrer"
249 title="List of supported sources by EmbedPress">Supported sources</a>
250 </li>
251 <li>
252 <a href="//embedpress.com/docs" target="_blank" rel="noopener noreferrer"
253 title="EmbedPress Documentation">Documentation</a>
254 </li>
255 <li>
256 <a href="//embedpress.com/addons/" target="_blank" rel="noopener noreferrer"
257 title="EmbedPress Add-Ons">Add-Ons</a>
258 </li>
259 <li>
260 <a href="//embedpress.com/contact" target="_blank" rel="noopener noreferrer"
261 title="Contact the EmbedPress team">Contact</a>
262 </li>
263 <li>
264 <a href="//twitter.com/embedpress" target="_blank" rel="noopener noreferrer">
265 <span class="dashicons dashicons-twitter"></span>
266 </a>
267 </li>
268 <li>
269 <a href="//facebook.com/embedpress" target="_blank" rel="noopener noreferrer">
270 <span class="dashicons dashicons-facebook"></span>
271 </a>
272 </li>
273 </ul>
274 </nav>
275 <p>
276 <a href="//embedpress.com" target="_blank" rel="noopener noreferrer">
277 <img width="100" src="//embedpress.com/wp-content/uploads/2018/01/ep-logo-2.png">
278 </a>
279 </p>
280 </footer>
281 </div>
282 <?php
283 }
284
285 /**
286 * Method that validates the form data.
287 *
288 * @param mixed $freshData Data received from the form.
289 *
290 * @return array
291 * @since 1.0.0
292 * @static
293 *
294 */
295 public static function validateForm( $freshData ) {
296 $data = [
297 'enablePluginInAdmin' => isset( $freshData['enablePluginInAdmin'] ) ? (bool)$freshData['enablePluginInAdmin'] : true,
298 'enablePluginInFront' => isset( $freshData['enablePluginInFront'] ) ? (bool)$freshData['enablePluginInFront'] : true,
299 'enableGlobalEmbedResize' => isset( $freshData['enableGlobalEmbedResize'] ) ? (bool)$freshData['enableGlobalEmbedResize'] : false,
300 'enableEmbedResizeHeight' => isset( $freshData['enableEmbedResizeHeight'] ) ? $freshData['enableEmbedResizeHeight'] : 552,
301 'enableEmbedResizeWidth' => isset( $freshData['enableEmbedResizeWidth'] ) ? $freshData['enableEmbedResizeWidth'] : 652,
302 'fbLanguage' => $freshData['fbLanguage'],
303 ];
304
305 return $data;
306 }
307
308 /**
309 * Method that renders the enablePluginInAdmin input.
310 *
311 * @since 1.0.0
312 * @static
313 */
314 public static function renderField_enablePluginInAdmin() {
315 $fieldName = "enablePluginInAdmin";
316
317 $options = get_option( self::$sectionGroupIdentifier );
318
319 $options[$fieldName] = !isset( $options[$fieldName] ) ? true : (bool)$options[$fieldName];
320
321 echo '<label><input type="radio" id="' . $fieldName . '_0" name="' . self::$sectionGroupIdentifier . '[' . $fieldName . ']" value="0" ' . (!$options[$fieldName] ? "checked" : "") . ' /> No</label>';
322 echo "&nbsp;&nbsp;";
323 echo '<label><input type="radio" id="' . $fieldName . '_1" name="' . self::$sectionGroupIdentifier . '[' . $fieldName . ']" value="1" ' . ($options[$fieldName] ? "checked" : "") . ' /> Yes</label>';
324 echo '<p class="description">Do you want EmbedPress to run here in the admin area? Disabling this <strong>will not</strong> affect your frontend embeds.</p>';
325 }
326
327 /**
328 * Method that renders the enablePluginInFront input.
329 *
330 * @since 1.6.0
331 * @static
332 */
333 public static function renderField_enablePluginInFront() {
334 $fieldName = "enablePluginInFront";
335
336 $options = get_option( self::$sectionGroupIdentifier );
337
338 $options[$fieldName] = !isset( $options[$fieldName] ) ? true : (bool)$options[$fieldName];
339
340 echo '<label><input type="radio" id="' . $fieldName . '_0" name="' . self::$sectionGroupIdentifier . '[' . $fieldName . ']" value="0" ' . (!$options[$fieldName] ? "checked" : "") . ' /> No</label>';
341 echo "&nbsp;&nbsp;";
342 echo '<label><input type="radio" id="' . $fieldName . '_1" name="' . self::$sectionGroupIdentifier . '[' . $fieldName . ']" value="1" ' . ($options[$fieldName] ? "checked" : "") . ' /> Yes</label>';
343 echo '<p class="description">Do you want EmbedPress to run within editors in frontend (if there\'s any)? Disabling this <strong>will not</strong> affect embeds seem by your regular users in frontend.</p>';
344 }
345
346 /**
347 * Method that renders the enablePluginInAdmin input.
348 *
349 * @since 2.4.1
350 * @static
351 */
352 public static function renderField_enableGlobalEmbedResize() {
353 $fieldName = "enableGlobalEmbedResize";
354
355 $options = get_option( self::$sectionGroupIdentifier );
356
357 $options[$fieldName] = !isset( $options[$fieldName] ) ? false : (bool)$options[$fieldName];
358
359 echo '<label><input class="enableglobalembedresize" type="radio" id="' . $fieldName . '_0" name="' . self::$sectionGroupIdentifier . '[' . $fieldName . ']" value="0" ' . (!$options[$fieldName] ? "checked" : "") . ' /> No</label>';
360 echo "&nbsp;&nbsp;";
361 echo '<label><input class="enableglobalembedresize" type="radio" id="' . $fieldName . '_1" name="' . self::$sectionGroupIdentifier . '[' . $fieldName . ']" value="1" ' . ($options[$fieldName] ? "checked" : "") . ' /> Yes</label>';
362 echo '<p class="description">Do you want use global embed dimension, Disabling this <strong>will not</strong> affect embeds.</p>';
363 }
364
365 /**
366 * Method that renders the enableEmbedResizeHeight input.
367 *
368 * @since 2.4.0
369 * @static
370 */
371 public static function renderField_enableEmbedResizeHeight() {
372 $fieldName = "enableEmbedResizeHeight";
373
374 $options = get_option( self::$sectionGroupIdentifier );
375
376 $value = !isset( $options[$fieldName] ) ? '552' : $options[$fieldName];
377
378 echo '<span class="embedpress-allow-globla-dimension"><input type="number" value="' . absint( $value ) . '" class="regular-text" name="' . self::$sectionGroupIdentifier . '[' . $fieldName . ']">';
379
380 echo '<p class="description">Global Embed Iframe Height</p></span>';
381 }
382
383 /**
384 * Method that renders the enableEmbedResizeWidth input.
385 *
386 * @since 2.4.0
387 * @static
388 */
389 public static function renderField_enableEmbedResizeWidth() {
390 $fieldName = "enableEmbedResizeWidth";
391 $options = get_option( self::$sectionGroupIdentifier );
392 $value = !isset( $options[$fieldName] ) ? '652' : $options[$fieldName];
393
394 echo '<span class="embedpress-allow-globla-dimension"><input type="number" value="' . absint( $value ) . '" class="regular-text" name="' . self::$sectionGroupIdentifier . '[' . $fieldName . ']">';
395 echo '<p class="description">Global Embed Iframe Width </p></span>';
396 }
397
398 /**
399 * Method that renders the forceFacebookLanguage input.
400 *
401 * @since 1.3.0
402 * @static
403 */
404 public static function renderField_forceFacebookLanguage() {
405 $fieldName = "fbLanguage";
406
407 $options = get_option( self::$sectionGroupIdentifier );
408
409 $options[$fieldName] = !isset( $options[$fieldName] ) ? "" : $options[$fieldName];
410
411 $facebookLocales = self::getFacebookAvailableLocales();
412
413 echo '<select name="' . self::$sectionGroupIdentifier . '[' . $fieldName . ']">';
414 echo '<option value="0">Automatic (by Facebook)</option>';
415 echo '<optgroup label="Available">';
416 foreach ( $facebookLocales as $locale => $localeName ) {
417 echo '<option value="' . $locale . '"' . ($options[$fieldName] === $locale ? ' selected' : '') . '>' . $localeName . '</option>';
418 }
419 echo '</optgroup>';
420 echo '</select>';
421
422 echo '<p class="description">Sometimes Facebook can choose the wrong language for embeds. If this happens, choose the correct language here.</p>';
423 }
424
425 /**
426 * Returns a list of locales that can be used on Facebook embeds.
427 *
428 * @return array
429 * @since 1.3.0
430 * @static
431 *
432 */
433 public static function getFacebookAvailableLocales() {
434 $locales = [
435 'af_ZA' => "Afrikaans",
436 'ak_GH' => "Akan",
437 'am_ET' => "Amharic",
438 'ar_AR' => "Arabic",
439 'as_IN' => "Assamese",
440 'ay_BO' => "Aymara",
441 'az_AZ' => "Azerbaijani",
442 'be_BY' => "Belarusian",
443 'bg_BG' => "Bulgarian",
444 'bn_IN' => "Bengali",
445 'br_FR' => "Breton",
446 'bs_BA' => "Bosnian",
447 'ca_ES' => "Catalan",
448 'cb_IQ' => "Sorani Kurdish",
449 'ck_US' => "Cherokee",
450 'co_FR' => "Corsican",
451 'cs_CZ' => "Czech",
452 'cx_PH' => "Cebuano",
453 'cy_GB' => "Welsh",
454 'da_DK' => "Danish",
455 'de_DE' => "German",
456 'el_GR' => "Greek",
457 'en_GB' => "English (UK)",
458 'en_IN' => "English (India)",
459 'en_PI' => "English (Pirate)",
460 'en_UD' => "English (Upside Down)",
461 'en_US' => "English (US)",
462 'eo_EO' => "Esperanto",
463 'es_CL' => "Spanish (Chile)",
464 'es_CO' => "Spanish (Colombia)",
465 'es_ES' => "Spanish (Spain)",
466 'es_LA' => "Spanish",
467 'es_MX' => "Spanish (Mexico)",
468 'es_VE' => "Spanish (Venezuela)",
469 'et_EE' => "Estonian",
470 'eu_ES' => "Basque",
471 'fa_IR' => "Persian",
472 'fb_LT' => "Leet Speak",
473 'ff_NG' => "Fulah",
474 'fi_FI' => "Finnish",
475 'fo_FO' => "Faroese",
476 'fr_CA' => "French (Canada)",
477 'fr_FR' => "French (France)",
478 'fy_NL' => "Frisian",
479 'ga_IE' => "Irish",
480 'gl_ES' => "Galician",
481 'gn_PY' => "Guarani",
482 'gu_IN' => "Gujarati",
483 'gx_GR' => "Classical Greek",
484 'ha_NG' => "Hausa",
485 'he_IL' => "Hebrew",
486 'hi_IN' => "Hindi",
487 'hr_HR' => "Croatian",
488 'ht_HT' => "Haitian Creole",
489 'hu_HU' => "Hungarian",
490 'hy_AM' => "Armenian",
491 'id_ID' => "Indonesian",
492 'ig_NG' => "Igbo",
493 'is_IS' => "Icelandic",
494 'it_IT' => "Italian",
495 'ja_JP' => "Japanese",
496 'ja_KS' => "Japanese (Kansai)",
497 'jv_ID' => "Javanese",
498 'ka_GE' => "Georgian",
499 'kk_KZ' => "Kazakh",
500 'km_KH' => "Khmer",
501 'kn_IN' => "Kannada",
502 'ko_KR' => "Korean",
503 'ku_TR' => "Kurdish (Kurmanji)",
504 'ky_KG' => "Kyrgyz",
505 'la_VA' => "Latin",
506 'lg_UG' => "Ganda",
507 'li_NL' => "Limburgish",
508 'ln_CD' => "Lingala",
509 'lo_LA' => "Lao",
510 'lt_LT' => "Lithuanian",
511 'lv_LV' => "Latvian",
512 'mg_MG' => "Malagasy",
513 'mi_NZ' => "Māori",
514 'mk_MK' => "Macedonian",
515 'ml_IN' => "Malayalam",
516 'mn_MN' => "Mongolian",
517 'mr_IN' => "Marathi",
518 'ms_MY' => "Malay",
519 'mt_MT' => "Maltese",
520 'my_MM' => "Burmese",
521 'nb_NO' => "Norwegian (bokmal)",
522 'nd_ZW' => "Ndebele",
523 'ne_NP' => "Nepali",
524 'nl_BE' => "Dutch (België)",
525 'nl_NL' => "Dutch",
526 'nn_NO' => "Norwegian (nynorsk)",
527 'ny_MW' => "Chewa",
528 'or_IN' => "Oriya",
529 'pa_IN' => "Punjabi",
530 'pl_PL' => "Polish",
531 'ps_AF' => "Pashto",
532 'pt_BR' => "Portuguese (Brazil)",
533 'pt_PT' => "Portuguese (Portugal)",
534 'qc_GT' => "Quiché",
535 'qu_PE' => "Quechua",
536 'rm_CH' => "Romansh",
537 'ro_RO' => "Romanian",
538 'ru_RU' => "Russian",
539 'rw_RW' => "Kinyarwanda",
540 'sa_IN' => "Sanskrit",
541 'sc_IT' => "Sardinian",
542 'se_NO' => "Northern Sámi",
543 'si_LK' => "Sinhala",
544 'sk_SK' => "Slovak",
545 'sl_SI' => "Slovenian",
546 'sn_ZW' => "Shona",
547 'so_SO' => "Somali",
548 'sq_AL' => "Albanian",
549 'sr_RS' => "Serbian",
550 'sv_SE' => "Swedish",
551 'sw_KE' => "Swahili",
552 'sy_SY' => "Syriac",
553 'sz_PL' => "Silesian",
554 'ta_IN' => "Tamil",
555 'te_IN' => "Telugu",
556 'tg_TJ' => "Tajik",
557 'th_TH' => "Thai",
558 'tk_TM' => "Turkmen",
559 'tl_PH' => "Filipino",
560 'tl_ST' => "Klingon",
561 'tr_TR' => "Turkish",
562 'tt_RU' => "Tatar",
563 'tz_MA' => "Tamazight",
564 'uk_UA' => "Ukrainian",
565 'ur_PK' => "Urdu",
566 'uz_UZ' => "Uzbek",
567 'vi_VN' => "Vietnamese",
568 'wo_SN' => "Wolof",
569 'xh_ZA' => "Xhosa",
570 'yi_DE' => "Yiddish",
571 'yo_NG' => "Yoruba",
572 'zh_CN' => "Simplified Chinese (China)",
573 'zh_HK' => "Traditional Chinese (Hong Kong)",
574 'zh_TW' => "Traditional Chinese (Taiwan)",
575 'zu_ZA' => "Zulu",
576 'zz_TR' => "Zazaki",
577 ];
578
579 return $locales;
580 }
581 }
582