예제 #1
0
 /**
  * Returns all available languages
  *
  * @author martin.malych
  */
 protected function getAllSetLangs()
 {
     return availableLocals();
 }
예제 #2
0
/**
 * 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;
    }
}