Inheritance: extends Waavi\Translation\Repositories\Repository
コード例 #1
0
 /**
  *  Load the messages strictly for the given locale.
  *
  *  @param  string  $locale
  *  @param  string  $group
  *  @param  string  $namespace
  *  @return array
  */
 public function loadSource($locale, $group, $namespace = '*')
 {
     $result = [];
     $translations = $this->translationRepository->getItems($locale, $namespace, $group);
     foreach ($translations as $translation) {
         array_set($result, $translation['item'], $translation['text']);
     }
     return $result;
 }
コード例 #2
0
ファイル: DatabaseLoader.php プロジェクト: waavi/translation
 /**
  *  Load the messages strictly for the given locale.
  *
  *  @param  string  $locale
  *  @param  string  $group
  *  @param  string  $namespace
  *  @return array
  */
 public function loadSource($locale, $group, $namespace = '*')
 {
     return $this->translationRepository->loadSource($locale, $namespace, $group);
 }