/**
  * Get all the translations for all modules on disk
  * @return array
  */
 public function all()
 {
     $files = $this->getTranslationFilenamesFromPaths($this->loader->paths());
     $translations = [];
     foreach ($files as $locale => $files) {
         foreach ($files as $namespace => $file) {
             $trans = $this->finder->getRequire($file);
             $trans = array_dot($trans);
             foreach ($trans as $key => $value) {
                 $translations[$locale]["{$namespace}.{$key}"] = $value;
             }
         }
     }
     return $translations;
 }
Esempio n. 2
0
 /**
  * Add a new namespace to the loader.
  *
  * @param  string  $namespace
  * @param  string  $hint
  * @return void
  */
 public function addNamespace($namespace, $hint)
 {
     $this->loader->addNamespace($namespace, $hint);
 }