Aimeos\ShopBundle\Controller\ExtadmController::getJsonClientI18n PHP Method

getJsonClientI18n() protected method

Returns the JSON encoded translations for the ExtJS client.
protected getJsonClientI18n ( array $i18nPaths, string $lang ) : string
$i18nPaths array List of file system paths which contain the translation files
$lang string ISO language code like "en" or "en_GB"
return string JSON encoded translation object
    protected function getJsonClientI18n(array $i18nPaths, $lang)
    {
        $i18n = new \Aimeos\MW\Translation\Gettext($i18nPaths, $lang);
        $content = array('admin' => $i18n->getAll('admin'), 'admin/ext' => $i18n->getAll('admin/ext'));
        return json_encode($content, JSON_FORCE_OBJECT);
    }