<?php

include("../../cli/startup.php");

$iconPath = '/pimcore/static6/img/flags/';

$locales = \Pimcore\Tool::getSupportedLocales();
$languageOptions = array();
foreach ($locales as $short => $translation) {
    if (!empty($short)) {
        $languageOptions[] = array(
            "language" => $short,
            "display" => $translation . " ($short)"
        );
    }
}


?>


<table>
    <tr>
        <th>Flag</th>
        <th>Code</th>
        <th>Name</th>
    </tr>
    <?php foreach ($languageOptions as $lang) {
    ?>
        <tr>
            <td><img style="width:16px" src="<?= str_replace(PIMCORE_DOCUMENT_ROOT, "", \Pimcore\Tool::getLanguageFlagFile($lang["language"])) ?>"></td>
            <td><?= $lang["language"] ?></td>
            <td><?= $lang["display"] ?></td>
        </tr>
    <?php

} ?>
</table>
