PluginProbe ʕ •ᴥ•ʔ
EmbedPress – PDF Embedder, Embed PDF viewer, YouTube Videos, 3D FlipBook, Social feeds & more / 2.6.1
EmbedPress – PDF Embedder, Embed PDF viewer, YouTube Videos, 3D FlipBook, Social feeds & more v2.6.1
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 5 years ago Settings.php 6 years ago index.html 7 years ago
Settings.php
615 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) 2020 WPDeveloper. All rights reserved.
16 * @license GPLv3 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 <div class="embedpress-version-name">
202 <span class="free">Core Version: <?php echo EMBEDPRESS_VERSION; ?></span>
203
204 <?php if ( defined('EMBEDPRESS_PRO_PLUGIN_VERSION')) { ?>
205 <span class="pro"> Pro Version: <?php echo EMBEDPRESS_PRO_PLUGIN_VERSION; ?></span>
206 <?php } ?>
207 </div>
208 </header>
209
210 <?php settings_errors(); ?>
211 <div>
212 <h2 class="nav-tab-wrapper">
213 <a href="?page=embedpress"
214 class="nav-tab<?php echo $activeTab === 'embedpress' || empty( $activeTab ) ? ' nav-tab-active' : ''; ?> ">
215 General settings
216 </a>
217 <?php if(!defined('EMBEDPRESS_PRO_PLUGIN_VERSION')): ?>
218 <a href="?page=embedpress&tab=embedpress_get_pro"
219 class="nav-tab<?php echo $activeTab === 'embedpress_get_pro' ? ' nav-tab-active' : ''; ?> ">
220 Go Premium
221 </a>
222 <?php endif; ?>
223 <?php do_action( 'embedpress:settings:render:tab', $activeTab ); ?>
224 <?php do_action( 'embedpress_license_tab', $activeTab ); ?>
225 </h2>
226
227 <?php if ( $activeTab !== 'addons' ) : ?>
228 <form action="options.php" method="POST" style="padding-bottom: 20px;">
229 <?php settings_fields( $settingsFieldsIdentifier ); ?>
230 <?php do_settings_sections( $settingsSectionsIdentifier ); ?>
231 <?php if ( $activeTab !== 'embedpress_license' && $activeTab !== 'embedpress_get_pro' ) : ?>
232 <button type="submit" class="button button-primary embedpress-setting-save">Save changes
233 </button>
234 <?php endif; ?>
235 </form>
236 <?php endif; ?>
237 <?php if ( $activeTab == 'embedpress_license' ) : ?>
238 <?php echo do_action( 'embedpress_license' ); ?>
239 <?php endif; ?>
240 <?php if ( $activeTab == 'embedpress_get_pro' && !defined('EMBEDPRESS_PRO_PLUGIN_VERSION') ) : ?>
241 <div class=" embedpress-go-premium">
242 <div class="embedpress-col-half">
243 <div class="embedpress-admin-block-wrapper">
244 <div class="embedpress-admin-block embedpress-admin-block-docs">
245 <header class="embedpress-admin-block-header">
246 <div class="embedpress-admin-block-header-icon">
247 <img src="<?php echo plugins_url( 'assets/images/icon-why-premium.svg', EMBEDPRESS_PLUGIN_BASENAME ); ?>" alt="embedpress-go-pro">
248 </div>
249 <h4 class="embedpress-admin-title">Why upgrade to Premium Version?</h4>
250 </header>
251 <div class="embedpress-admin-block-content">
252 <p>The premium version helps us to continue development of the product incorporating even more features and enhancements.</p>
253 <p>You will also get world class support from our dedicated team, 24/7.</p>
254 <a href="https://wpdeveloper.net/plugins/embedpress#pricing" target="_blank" class="button embedpress-btn">Get Pro Version</a>
255 </div>
256 </div>
257 </div><!--admin block-wrapper end-->
258 </div>
259 </div>
260 <?php endif; ?>
261 </div>
262
263 <footer>
264 <p>
265 <a href="//embedpress.com/go/review-ep" target="_blank"
266 rel="noopener noreferrer">If you like <strong>EmbedPress</strong> please leave us a <span
267 class="dashicons dashicons-star-filled"></span><span
268 class="dashicons dashicons-star-filled"></span><span
269 class="dashicons dashicons-star-filled"></span><span
270 class="dashicons dashicons-star-filled"></span><span
271 class="dashicons dashicons-star-filled"></span> rating. Thank you!</a>
272 </p>
273 <hr>
274 <nav>
275 <ul>
276 <li>
277 <a href="//embedpress.com" target="_blank" rel="noopener noreferrer"
278 title="About EmbedPress">About</a>
279 </li>
280 <li>
281 <a href="//embedpress.com/sources/" target="_blank" rel="noopener noreferrer"
282 title="List of supported sources by EmbedPress">Supported sources</a>
283 </li>
284 <li>
285 <a href="//embedpress.com/documentation/" target="_blank" rel="noopener noreferrer"
286 title="EmbedPress Documentation">Documentation</a>
287 </li>
288 <li>
289 <a href="//embedpress.com/#pricing" target="_blank" rel="noopener noreferrer"
290 title="Get EmbedPress Pro">Get EmbedPress Pro</a>
291 </li>
292 <li>
293 <a href="//embedpress.com/support/" target="_blank" rel="noopener noreferrer"
294 title="Contact the EmbedPress team">Contact</a>
295 </li>
296 <li>
297 <a href="//twitter.com/wpdevteam" target="_blank" rel="noopener noreferrer">
298 <span class="dashicons dashicons-twitter"></span>
299 </a>
300 </li>
301 <li>
302 <a href="//www.facebook.com/WPDeveloperNet/" target="_blank" rel="noopener noreferrer">
303 <span class="dashicons dashicons-facebook"></span>
304 </a>
305 </li>
306 </ul>
307 </nav>
308 <p>
309 <a href="//embedpress.com" target="_blank" rel="noopener noreferrer">
310 <img width="100" src="<?php echo plugins_url( 'assets/images/embedpress.png', EMBEDPRESS_PLUGIN_BASENAME ); ?>">
311 </a>
312 </p>
313 </footer>
314 </div>
315 <?php
316 }
317
318 /**
319 * Method that validates the form data.
320 *
321 * @param mixed $freshData Data received from the form.
322 *
323 * @return array
324 * @since 1.0.0
325 * @static
326 *
327 */
328 public static function validateForm( $freshData ) {
329 $data = [
330 'enablePluginInAdmin' => isset( $freshData['enablePluginInAdmin'] ) ? (bool)$freshData['enablePluginInAdmin'] : true,
331 'enablePluginInFront' => isset( $freshData['enablePluginInFront'] ) ? (bool)$freshData['enablePluginInFront'] : true,
332 'enableGlobalEmbedResize' => isset( $freshData['enableGlobalEmbedResize'] ) ? (bool)$freshData['enableGlobalEmbedResize'] : false,
333 'enableEmbedResizeHeight' => isset( $freshData['enableEmbedResizeHeight'] ) ? $freshData['enableEmbedResizeHeight'] : 552,
334 'enableEmbedResizeWidth' => isset( $freshData['enableEmbedResizeWidth'] ) ? $freshData['enableEmbedResizeWidth'] : 652,
335 'fbLanguage' => $freshData['fbLanguage'],
336 ];
337
338 return $data;
339 }
340
341 /**
342 * Method that renders the enablePluginInAdmin input.
343 *
344 * @since 1.0.0
345 * @static
346 */
347 public static function renderField_enablePluginInAdmin() {
348 $fieldName = "enablePluginInAdmin";
349
350 $options = get_option( self::$sectionGroupIdentifier );
351
352 $options[$fieldName] = !isset( $options[$fieldName] ) ? true : (bool)$options[$fieldName];
353
354 echo '<label><input type="radio" id="' . $fieldName . '_0" name="' . self::$sectionGroupIdentifier . '[' . $fieldName . ']" value="0" ' . (!$options[$fieldName] ? "checked" : "") . ' /> No</label>';
355 echo "&nbsp;&nbsp;";
356 echo '<label><input type="radio" id="' . $fieldName . '_1" name="' . self::$sectionGroupIdentifier . '[' . $fieldName . ']" value="1" ' . ($options[$fieldName] ? "checked" : "") . ' /> Yes</label>';
357 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>';
358 }
359
360 /**
361 * Method that renders the enablePluginInFront input.
362 *
363 * @since 1.6.0
364 * @static
365 */
366 public static function renderField_enablePluginInFront() {
367 $fieldName = "enablePluginInFront";
368
369 $options = get_option( self::$sectionGroupIdentifier );
370
371 $options[$fieldName] = !isset( $options[$fieldName] ) ? true : (bool)$options[$fieldName];
372
373 echo '<label><input type="radio" id="' . $fieldName . '_0" name="' . self::$sectionGroupIdentifier . '[' . $fieldName . ']" value="0" ' . (!$options[$fieldName] ? "checked" : "") . ' /> No</label>';
374 echo "&nbsp;&nbsp;";
375 echo '<label><input type="radio" id="' . $fieldName . '_1" name="' . self::$sectionGroupIdentifier . '[' . $fieldName . ']" value="1" ' . ($options[$fieldName] ? "checked" : "") . ' /> Yes</label>';
376 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>';
377 }
378
379 /**
380 * Method that renders the enablePluginInAdmin input.
381 *
382 * @since 2.4.1
383 * @static
384 */
385 public static function renderField_enableGlobalEmbedResize() {
386 $fieldName = "enableGlobalEmbedResize";
387
388 $options = get_option( self::$sectionGroupIdentifier );
389
390 $options[$fieldName] = !isset( $options[$fieldName] ) ? false : (bool)$options[$fieldName];
391
392 echo '<label><input class="enableglobalembedresize" type="radio" id="' . $fieldName . '_0" name="' . self::$sectionGroupIdentifier . '[' . $fieldName . ']" value="0" ' . (!$options[$fieldName] ? "checked" : "") . ' /> No</label>';
393 echo "&nbsp;&nbsp;";
394 echo '<label><input class="enableglobalembedresize" type="radio" id="' . $fieldName . '_1" name="' . self::$sectionGroupIdentifier . '[' . $fieldName . ']" value="1" ' . ($options[$fieldName] ? "checked" : "") . ' /> Yes</label>';
395 echo '<p class="description">Do you want use global embed dimension, Disabling this <strong>will not</strong> affect embeds.</p>';
396 }
397
398 /**
399 * Method that renders the enableEmbedResizeHeight input.
400 *
401 * @since 2.4.0
402 * @static
403 */
404 public static function renderField_enableEmbedResizeHeight() {
405 $fieldName = "enableEmbedResizeHeight";
406
407 $options = get_option( self::$sectionGroupIdentifier );
408
409 $value = !isset( $options[$fieldName] ) ? '552' : $options[$fieldName];
410
411 echo '<span class="embedpress-allow-globla-dimension"><input type="number" value="' . absint( $value ) . '" class="regular-text" name="' . self::$sectionGroupIdentifier . '[' . $fieldName . ']">';
412
413 echo '<p class="description">Global Embed Iframe Height</p></span>';
414 }
415
416 /**
417 * Method that renders the enableEmbedResizeWidth input.
418 *
419 * @since 2.4.0
420 * @static
421 */
422 public static function renderField_enableEmbedResizeWidth() {
423 $fieldName = "enableEmbedResizeWidth";
424 $options = get_option( self::$sectionGroupIdentifier );
425 $value = !isset( $options[$fieldName] ) ? '652' : $options[$fieldName];
426
427 echo '<span class="embedpress-allow-globla-dimension"><input type="number" value="' . absint( $value ) . '" class="regular-text" name="' . self::$sectionGroupIdentifier . '[' . $fieldName . ']">';
428 echo '<p class="description">Global Embed Iframe Width </p></span>';
429 }
430
431 /**
432 * Method that renders the forceFacebookLanguage input.
433 *
434 * @since 1.3.0
435 * @static
436 */
437 public static function renderField_forceFacebookLanguage() {
438 $fieldName = "fbLanguage";
439
440 $options = get_option( self::$sectionGroupIdentifier );
441
442 $options[$fieldName] = !isset( $options[$fieldName] ) ? "" : $options[$fieldName];
443
444 $facebookLocales = self::getFacebookAvailableLocales();
445
446 echo '<select name="' . self::$sectionGroupIdentifier . '[' . $fieldName . ']">';
447 echo '<option value="0">Automatic (by Facebook)</option>';
448 echo '<optgroup label="Available">';
449 foreach ( $facebookLocales as $locale => $localeName ) {
450 echo '<option value="' . $locale . '"' . ($options[$fieldName] === $locale ? ' selected' : '') . '>' . $localeName . '</option>';
451 }
452 echo '</optgroup>';
453 echo '</select>';
454
455 echo '<p class="description">Sometimes Facebook can choose the wrong language for embeds. If this happens, choose the correct language here.</p>';
456 }
457
458 /**
459 * Returns a list of locales that can be used on Facebook embeds.
460 *
461 * @return array
462 * @since 1.3.0
463 * @static
464 *
465 */
466 public static function getFacebookAvailableLocales() {
467 $locales = [
468 'af_ZA' => "Afrikaans",
469 'ak_GH' => "Akan",
470 'am_ET' => "Amharic",
471 'ar_AR' => "Arabic",
472 'as_IN' => "Assamese",
473 'ay_BO' => "Aymara",
474 'az_AZ' => "Azerbaijani",
475 'be_BY' => "Belarusian",
476 'bg_BG' => "Bulgarian",
477 'bn_IN' => "Bengali",
478 'br_FR' => "Breton",
479 'bs_BA' => "Bosnian",
480 'ca_ES' => "Catalan",
481 'cb_IQ' => "Sorani Kurdish",
482 'ck_US' => "Cherokee",
483 'co_FR' => "Corsican",
484 'cs_CZ' => "Czech",
485 'cx_PH' => "Cebuano",
486 'cy_GB' => "Welsh",
487 'da_DK' => "Danish",
488 'de_DE' => "German",
489 'el_GR' => "Greek",
490 'en_GB' => "English (UK)",
491 'en_IN' => "English (India)",
492 'en_PI' => "English (Pirate)",
493 'en_UD' => "English (Upside Down)",
494 'en_US' => "English (US)",
495 'eo_EO' => "Esperanto",
496 'es_CL' => "Spanish (Chile)",
497 'es_CO' => "Spanish (Colombia)",
498 'es_ES' => "Spanish (Spain)",
499 'es_LA' => "Spanish",
500 'es_MX' => "Spanish (Mexico)",
501 'es_VE' => "Spanish (Venezuela)",
502 'et_EE' => "Estonian",
503 'eu_ES' => "Basque",
504 'fa_IR' => "Persian",
505 'fb_LT' => "Leet Speak",
506 'ff_NG' => "Fulah",
507 'fi_FI' => "Finnish",
508 'fo_FO' => "Faroese",
509 'fr_CA' => "French (Canada)",
510 'fr_FR' => "French (France)",
511 'fy_NL' => "Frisian",
512 'ga_IE' => "Irish",
513 'gl_ES' => "Galician",
514 'gn_PY' => "Guarani",
515 'gu_IN' => "Gujarati",
516 'gx_GR' => "Classical Greek",
517 'ha_NG' => "Hausa",
518 'he_IL' => "Hebrew",
519 'hi_IN' => "Hindi",
520 'hr_HR' => "Croatian",
521 'ht_HT' => "Haitian Creole",
522 'hu_HU' => "Hungarian",
523 'hy_AM' => "Armenian",
524 'id_ID' => "Indonesian",
525 'ig_NG' => "Igbo",
526 'is_IS' => "Icelandic",
527 'it_IT' => "Italian",
528 'ja_JP' => "Japanese",
529 'ja_KS' => "Japanese (Kansai)",
530 'jv_ID' => "Javanese",
531 'ka_GE' => "Georgian",
532 'kk_KZ' => "Kazakh",
533 'km_KH' => "Khmer",
534 'kn_IN' => "Kannada",
535 'ko_KR' => "Korean",
536 'ku_TR' => "Kurdish (Kurmanji)",
537 'ky_KG' => "Kyrgyz",
538 'la_VA' => "Latin",
539 'lg_UG' => "Ganda",
540 'li_NL' => "Limburgish",
541 'ln_CD' => "Lingala",
542 'lo_LA' => "Lao",
543 'lt_LT' => "Lithuanian",
544 'lv_LV' => "Latvian",
545 'mg_MG' => "Malagasy",
546 'mi_NZ' => "Māori",
547 'mk_MK' => "Macedonian",
548 'ml_IN' => "Malayalam",
549 'mn_MN' => "Mongolian",
550 'mr_IN' => "Marathi",
551 'ms_MY' => "Malay",
552 'mt_MT' => "Maltese",
553 'my_MM' => "Burmese",
554 'nb_NO' => "Norwegian (bokmal)",
555 'nd_ZW' => "Ndebele",
556 'ne_NP' => "Nepali",
557 'nl_BE' => "Dutch (België)",
558 'nl_NL' => "Dutch",
559 'nn_NO' => "Norwegian (nynorsk)",
560 'ny_MW' => "Chewa",
561 'or_IN' => "Oriya",
562 'pa_IN' => "Punjabi",
563 'pl_PL' => "Polish",
564 'ps_AF' => "Pashto",
565 'pt_BR' => "Portuguese (Brazil)",
566 'pt_PT' => "Portuguese (Portugal)",
567 'qc_GT' => "Quiché",
568 'qu_PE' => "Quechua",
569 'rm_CH' => "Romansh",
570 'ro_RO' => "Romanian",
571 'ru_RU' => "Russian",
572 'rw_RW' => "Kinyarwanda",
573 'sa_IN' => "Sanskrit",
574 'sc_IT' => "Sardinian",
575 'se_NO' => "Northern Sámi",
576 'si_LK' => "Sinhala",
577 'sk_SK' => "Slovak",
578 'sl_SI' => "Slovenian",
579 'sn_ZW' => "Shona",
580 'so_SO' => "Somali",
581 'sq_AL' => "Albanian",
582 'sr_RS' => "Serbian",
583 'sv_SE' => "Swedish",
584 'sw_KE' => "Swahili",
585 'sy_SY' => "Syriac",
586 'sz_PL' => "Silesian",
587 'ta_IN' => "Tamil",
588 'te_IN' => "Telugu",
589 'tg_TJ' => "Tajik",
590 'th_TH' => "Thai",
591 'tk_TM' => "Turkmen",
592 'tl_PH' => "Filipino",
593 'tl_ST' => "Klingon",
594 'tr_TR' => "Turkish",
595 'tt_RU' => "Tatar",
596 'tz_MA' => "Tamazight",
597 'uk_UA' => "Ukrainian",
598 'ur_PK' => "Urdu",
599 'uz_UZ' => "Uzbek",
600 'vi_VN' => "Vietnamese",
601 'wo_SN' => "Wolof",
602 'xh_ZA' => "Xhosa",
603 'yi_DE' => "Yiddish",
604 'yo_NG' => "Yoruba",
605 'zh_CN' => "Simplified Chinese (China)",
606 'zh_HK' => "Traditional Chinese (Hong Kong)",
607 'zh_TW' => "Traditional Chinese (Taiwan)",
608 'zu_ZA' => "Zulu",
609 'zz_TR' => "Zazaki",
610 ];
611
612 return $locales;
613 }
614 }
615