Jarves\Controller\Admin\LanguageController::getLanguage PHP Метод

getLanguage() защищенный Метод

protected getLanguage ( string $bundle, string $lang ) : array
$bundle string
$lang string
Результат array
    protected function getLanguage($bundle, $lang)
    {
        Manager::prepareName($bundle);
        $utils = $this->translator->getUtils();
        $file = $this->jarves->getBundleDir($bundle) . "Resources/translations/{$lang}.po";
        $res = $utils->parsePo($file);
        $pluralForm = $utils->getPluralForm($lang);
        preg_match('/^nplurals=([0-9]+);/', $pluralForm, $match);
        $res['pluralCount'] = intval($match[1]);
        $res['pluralForm'] = $pluralForm;
        return $res;
    }