Example #1
0
 /**
  * Get fallback chain for a given language.
  *
  * @param string $lang Language code
  * @return string[] List of one or more language codes
  */
 public function getLangFallbacks($lang)
 {
     if (self::$fallbackCache === null) {
         // Lazy-initialize
         self::$fallbackCache = $this->fetchLangFallbacks();
     }
     $lang = $this->normalizeLang($lang);
     return isset(self::$fallbackCache[$lang]) ? self::$fallbackCache[$lang] : array('en');
 }