diff options
Diffstat (limited to 'core/libraries')
| -rw-r--r-- | core/libraries/I18n.php | 14 | 
1 files changed, 14 insertions, 0 deletions
| diff --git a/core/libraries/I18n.php b/core/libraries/I18n.php index 51bc2a51..19215325 100644 --- a/core/libraries/I18n.php +++ b/core/libraries/I18n.php @@ -101,6 +101,10 @@ class I18n_Core {      return $entry;    } +  public function getLocale() { +    return $this->_config['default_locale']; +  } +    private function lookup($locale, $message) {      if (!isset($this->_cache[$locale])) {        $this->_cache[$locale] = array(); @@ -113,6 +117,16 @@ class I18n_Core {                 ->as_array() as $row) {          $this->_cache[$locale][$row->key] = unserialize($row->translation);        } + +      // Override incoming with outgoing... +      foreach (Database::instance() +               ->select("key", "translation") +               ->from("outgoing_translations") +               ->where(array("locale" => $locale)) +               ->get() +               ->as_array() as $row) { +        $this->_cache[$locale][$row->key] = unserialize($row->translation); +      }      }      $key = self::getMessageKey($message); | 
