Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
locales.php
Go to the documentation of this file.
1 <?php
7 if (isset($_GET['type']) && $_GET['type'] == 'deployed') {
8  $themePath = isset($_GET['theme_path']) ? $_GET['theme_path'] : 'adminhtml/Magento/backend';
9  $directory = __DIR__ . '/../../../../pub/static/' . $themePath;
10  $locales = array_diff(scandir($directory), ['..', '.']);
11 } else {
12  require_once __DIR__ . DIRECTORY_SEPARATOR . 'bootstrap.php';
13  $localeConfig = $magentoObjectManager->create(\Magento\Framework\Locale\Config::class);
14  $locales = $localeConfig->getAllowedLocales();
15 }
16 
17 echo implode('|', $locales);
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition: _bootstrap.php:60
$locales
Definition: locales.php:14
$localeConfig
Definition: locales.php:13
$magentoObjectManager