/** * Loads text resources for the current culture. */ private function LoadResources() { \Nemiro\Console::Info('Resources loading.'); # global resources $this->MergeResources('~/global.json'); # global resources for current culture if ($this->Culture != NULL && $this->Culture != '') { if (!$this->MergeResources('~/global.' . $this->Culture . '.json') && strpos($this->Culture, '-') !== FALSE) { $this->MergeResources('~/global.' . explode('-', $this->Culture)[0] . '.json'); } } $sciptName = App::GetScriptPath() . App::GetScriptName(); # load default resourses for current page $this->MergeResources($sciptName . '.json'); # load resourses for current culture if ($this->Culture != NULL && $this->Culture != '') { if (!$this->MergeResources($sciptName . '.' . $this->Culture . '.json') && strpos($this->Culture, '-') !== FALSE) { $this->MergeResources($sciptName . '.' . explode('-', $this->Culture)[0] . '.json'); } } \Nemiro\Console::Info('Resources loaded.'); }