@param string      $locale
@param string|null $version

@return array
@throws ArgumentException
@throws SettingsException
178310
public static function getStaticSummonerSpells( string $locale = 'en_US', string $version = null ) : array
	{
		$url = self::getStaticDataFileUrl(self::STATIC_SUMMONERSPELLS, null, $locale, $version);
		return self::loadStaticData($url, [DataDragonAPI::class, "_summonerSpell"]);
	}
1185231
public function locale($locale = null)
    {
        if ($locale) {
            // Normalize the language
            self::$locale = strtolower(str_replace([' ', '_'], '-', $locale));
        }

        return self::$locale;
    }
1080078
public function getPluralForms(Locale $locale)
    {
        if (!isset($this->rulesetsIndices[$locale->getLanguage()])) {
            return [self::RULE_OTHER];
        }

        $ruleset = $this->rulesets[$locale->getLanguage()][$this->rulesetsIndices[$locale->getLanguage()]] ?? null;

        if ($ruleset === null) {
            return [self::RULE_OTHER];
        }

        return array_merge(array_keys($ruleset), [self::RULE_OTHER]);
    }
470851
public function findMetaTag($key, $locale = null)
    {
        $criteria = array('keyword' => $key);
        if ($locale && property_exists($this->entityClass, 'locale')) {
            $criteria['locale'] = $locale;
        }

        return $this->getRepository()->findOneBy($criteria);
    }
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);
	}
841681
public function findCanonical(string $locale): ?Scope
    {
        $canonicals = $this->config->get('canonicals');

        if (!isset($canonicals[$locale])) {
            return null;
        }

        $scope = $this->findByRoot($canonicals[$locale]);

        return $scope->setCustomRoot(Root::fromString($canonicals[$locale]));
    }
1297937
public function retrieveFieldDescriptors($locale)
    {
        $fieldDescriptors = [];

        $fieldDescriptors['id'] = new DoctrineFieldDescriptor(
            'id',
            'id',
            static::$attributeEntityName,
            null,
            [
                static::$attributeEntityName => new DoctrineJoinDescriptor(
                    static::$attributeEntityName,
                    static::$productEntityName . '.variantAttributes'
                ),
            ],
            true,
            false,
            'integer'
        );

        $fieldDescriptors['name'] = new DoctrineFieldDescriptor(
            'name',
            'name',
            static::$attributeTranslationEntityName,
            null,
            [
                static::$attributeEntityName => new DoctrineJoinDescriptor(
                    static::$attributeEntityName,
                    static::$productEntityName . '.variantAttributes'
                ),
                static::$attributeTranslationEntityName => new DoctrineJoinDescriptor(
                    static::$attributeTranslationEntityName,
                    static::$attributeEntityName . '.translations',
                    static::$attributeTranslationEntityName . '.locale = \'' . $locale . '\'',
                    DoctrineJoinDescriptor::JOIN_METHOD_INNER
                ),
            ],
            false,
            true,
            'string'
        );

        return $fieldDescriptors;
    }
1209289
public static function getStaticSummonerSpellsWithKeys( string $locale = 'en_US', string $version = null ) : array
	{
		$url = self::getStaticDataFileUrl(self::STATIC_SUMMONERSPELLS, null, $locale, $version, self::STATIC_SUMMONERSPELLS_BY_KEY);
		$data = self::loadCachedStaticData($url);
		if (!$data)
		{
			self::getStaticSummonerSpells($locale, $version);
			$data = self::loadCachedStaticData($url);
		}
		return $data;
	}
861566
public function hasVersionMigrated(Version $version)
    {
        $this->createMigrationCollection();

        $record = $this->getCollection()->findOne(['v' => $version->getVersion()]);

        return null !== $record;
    }
386315
public static final function configuration(string $locale) {
    if (!empty($locale)) {
      Lang::$locale = $locale;
    } else {
      Lang::$locale = Lang::STANDARD_LOCALE;
    }
    return null;
  }
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);
    }
423826
public function get(string $key, string $locale = null)
    {
        $realKey = $this->getRealKey($key, $locale);

        return ArrayHelper::get($this->messages, $realKey);
    }
210825
public static function create(Version $packageVersion, Locale $locale)
    {
        $result = new static();
        $result->packageVersion = $packageVersion;
        $result->locale = $locale;
        $result->lastUpdated = null;
        $result->total = 0;
        $result->translated = 0;

        return $result;
    }
863565
public static function get($key, $default = null, $locale = null)
    {
        return self::all($locale)->get($key, $default);
    }
826476
protected function getLocale($locale)
    {
        $result = null;
        if ($locale instanceof LocaleEntity) {
            $result = $locale;
        } elseif (is_string($locale) && $locale !== '') {
            $result = $this->app->make(LocaleRepository::class)->findApproved($locale);
        }

        return $result;
    }
1367371
public function forLocale($locale, $fallbacks = null)
    {
        $fork = new static(
            $this->coreFormatter,
            $this->extractor,
            $this->typeProvider,
            $this->textProvider,
            $this->_extensions
        );

        if ($fallbacks) {
            $fork->setFallbacks((array)$fallbacks);
        }

        return $fork->setLocale($locale);
    }
267827
public function getInfo($locale = null)
	{
		$info = parent::getInfo($locale);
		
		$info = $info + array(
			// FIXME: returns different type depending on the input (string, array)
			'size' => $this->getSize()
		);
		
		return $info;
	}