/** * Returns all available languages * * @author martin.malych */ protected function getAllSetLangs() { return availableLocals(); }
/** * Returns locale in format ISO-639-1. * * @param string $lang locale ISO-639-2 */ function getHtmlLocale($lang) { $langs = array_flip(availableLocals()); if (isset($langs[$lang])) { return $langs[$lang]; } else { return null; } }