public function getJsFiles($locale) { $files = array_get($this->js, $locale, []); $parts = explode('-', $locale); if (count($parts) > 1) { $files = array_merge(array_get($this->js, $parts[0], []), $files); } return $files; }
/** * Set up the locale compiler for the given locale. * * @param string $locale * @return LocaleJsCompiler */ protected function getLocaleCompiler($locale) { $compiler = new LocaleJsCompiler($this->getAssetDirectory(), "{$this->clientName}-{$locale}.js"); foreach ($this->locales->getJsFiles($locale) as $file) { $compiler->addFile($file); } return $compiler; }