Reads data.

@param string $category A category.
@param string $locale A locale identifier.
@param string $scope The scope for the current operation.
@return array
975580
public function read($category, $locale, $scope) {
		$scope = $scope ?: 'default';

		if (isset($this->_data[$scope][$category][$locale])) {
			return $this->_data[$scope][$category][$locale];
		}
	}
593849
public function readFromLocalImage($localImage, $remoteFolder, $barcodeReadType)
    {
        $folder = new Folder();
        $folder->UploadFile($localImage, $remoteFolder);
        $data = $this->ReadR(basename($localImage), $remoteFolder, $barcodeReadType);
        return $data;
    }
89871
public static function getStaticReforgedRunes( string $locale = 'en_US', string $version = null ) : array
	{
		$url = self::getStaticDataFileUrl(self::STATIC_RUNESREFORGED, null, $locale, $version);
		return self::loadStaticData($url);
	}
837314
public function set($scope, $category, $name, $value)
    {
        if (is_array($name)) {
            foreach ($name as $rowLabel => $rowValue) {
                $this->set($scope, $category, $rowLabel, $rowValue);
            }
            return;
        }

        $this->changedData[$scope][$category][$name] = $value;

        $currentLanguage = $this->getLanguage();
        if (!isset($this->data[$currentLanguage])) {
            $this->init();
        }
        $this->data[$currentLanguage][$scope][$category][$name] = $value;

        $this->undelete($scope, $category, $name);
    }
513531
protected function loadDefinitions($locale)
    {
        if (!isset($this->definitions[$locale])) {
            $filename = $this->definitionPath . $locale . '.json';
            $this->definitions[$locale] = json_decode(file_get_contents($filename), true);
        }

        return $this->definitions[$locale];
    }
1207865
public function getMessages($locale = null)
    {
        return $locale === null ? $this->messages : $this->messages[$locale];
    }
1334904
public function read($locale, array $excluded = [])
    {
        // Empty our translations for a new read
        $this->translations = collect();

        $files = $this->filesystem->listContents($locale);

        foreach ($files as $file) {
            $filename = substr($file['path'], strrpos($file['path'], '/'));
            $filename = ltrim($filename, '/');
            $filename = str_replace('.php', '', $filename);

            if (in_array($filename, $excluded)) {
                continue;
            }

            $this->translations[$filename] = require $this->path . DIRECTORY_SEPARATOR . $file['path'];
        }

        $this->validateTranslations();

        return $this;
    }
359041
protected function getLocaleSlug(Locale $locale, $categoryName)
    {
        $slug          = Sluggable::makeSlug($categoryName);
        $currentLocale = $this->getRequestHelper()->getCurrentLocale();
        if ($locale->getCode() != $currentLocale) {
            $slug = Sluggable::makeSlug(sprintf('%s-%s', $categoryName, $locale->getCode()));
        }

        return $slug;
    }
1151462
private function createTranslation(CategoryInterface $category, $locale)
    {
        $categoryTranslation = $this->categoryTranslationRepository->createNew();
        $categoryTranslation->setLocale($locale);
        $categoryTranslation->setTranslation('');
        $categoryTranslation->setCategory($category);
        $category->addTranslation($categoryTranslation);

        $this->entityManager->persist($categoryTranslation);

        return $categoryTranslation;
    }
1021420
public static function findBySlug($slug, $locale = null)
    {
        /** @var \Dimsav\Translatable\Translatable $model */
        $model = (new static);

        /** @var SluggableTrait $translationModel */
        $translationModel = $model->getTranslationModelName();
        $parentKey        = $model->getRelationKey();

        $translationInstance = $translationModel::findBySlug($slug, $locale);

        if (empty($translationInstance)) return null;

        return static::find($translationInstance->{$parentKey});
    }
799549
public function scopeWhereSlug($query, $slug, $locale = null)
    {
        return $query->whereHas('translations', function ($query) use ($slug, $locale) {
            return $query->whereSlug($slug, $locale, true);
        });
    }
791050
public function findAll($locale, $filter = null)
    {
        if ($filter) {
            $accountEntities = $this->accountRepository->findByFilter($filter);
        } else {
            $accountEntities = $this->accountRepository->findAll();
        }

        if (!empty($accountEntities)) {
            $accounts = [];
            foreach ($accountEntities as $account) {
                $accounts[] = $this->getApiObject($account, $locale);
            }

            return $accounts;
        }

        return;
    }
932345
public static function getListForLocale($locale)
    {
        $translation_list_en = array();
        $translation_list_locale = array();
        $result = array();

        $translation_list = TranslationQuery::create()->joinWithI18n('en')->find();

        foreach ($translation_list as $translation_item) {
            /** @var Translation $translation_item */
            $translation_list_en[$translation_item->getId()]['alias'] = $translation_item->getAlias();
            $translation_list_en[$translation_item->getId()]['title'] = $translation_item->getTitle();
        }

        $translation_list = TranslationQuery::create()->joinWithI18n($locale)->find();
        foreach ($translation_list as $translation_item) {
            /** @var Translation $translation_item */
            $translation_list_locale[$translation_item->getId()] = $translation_item->getTitle();
        }

        foreach ($translation_list_en as $id => $translation_item) {
            $result[$translation_item['alias']] = isset($translation_list_locale[$id]) && $translation_list_locale[$id] ?
                $translation_list_locale[$id] :
                ($translation_item['title'] ? $translation_item['title'] : $translation_item['alias']);
        }

        return $result;
    }
1279657
public function load($locale, $group, $namespace = null): array
    {
        $fileTranslations = parent::load($locale, $group, $namespace);

        if (! is_null($namespace) && $namespace !== '*') {
            return $fileTranslations;
        }

        $loaderTranslations = $this->getTranslationsForTranslationLoaders($locale, $group, $namespace);

        return array_replace_recursive($fileTranslations, $loaderTranslations);
    }
422169
public function load($locale, $group, $namespace = null)
	{
		if (is_null($namespace) || $namespace == '*')
		{
			return $this->loadData($locale, $group);
		}

		return $this->loadNamespaced($locale, $group, $namespace);
	}
716259
protected function _file($category, $locale, $scope) {
		$path = $this->_config['path'];
		$scope = $scope ?: 'default';

		if (($pos = strpos($category, 'Template')) !== false) {
			$category = substr($category, 0, $pos);
			return "{$path}/{$category}_{$scope}.php";
		}
		return "{$path}/{$locale}/{$category}/{$scope}.php";
	}
205167
public function getTranslations(Locale $locale)
    {
        $localeID = $locale->getID();
        $translations = isset($this->translations[$localeID]) ? $this->translations[$localeID][1] : null;
        if ($translations === null) {
            $translations = clone $this->getSourceStrings(true);
            $translations->setLanguage($locale->getID());
            $this->setTranslations($locale, $translations);
        }

        return $translations;
    }