src/app/dbtext/storage/GroupData.php
public function find(string $key, N2nLocale ...$n2nLocales): ?string {
		if (!isset($this->data[self::TEXTS_KEY][$key])) {
			return null;
		}

		array_push($n2nLocales, N2nLocale::getFallback());

		foreach ($n2nLocales as $n2nLocale) {
			$n2nLocaleId = $n2nLocale->getId();
			if (isset($this->data[self::TEXTS_KEY][$key][$n2nLocaleId])) {
				return $this->data[self::TEXTS_KEY][$key][$n2nLocaleId];
			}

			// if no region id than locale id and language id are the same.
			if (null === $n2nLocale->getRegionId()) {
				continue;
			}

			$langId = $n2nLocale->getLanguageId();
			if (isset($this->data[self::TEXTS_KEY][$key][$langId])) {
				return $this->data[self::TEXTS_KEY][$key][$langId];
			}
		}

		return null;
	}
public function find(string $key, N2nLocale ...$n2nLocales): ?string {
		if (!isset($this->data[self::TEXTS_KEY][$key])) {
			return null;
		}

		array_push($n2nLocales, N2nLocale::getFallback());

		foreach ($n2nLocales as $n2nLocale) {
			$n2nLocaleId = $n2nLocale->getId();
			if (isset($this->data[self::TEXTS_KEY][$key][$n2nLocaleId])) {
				return $this->data[self::TEXTS_KEY][$key][$n2nLocaleId];
			}

			// if no region id than locale id and language id are the same.
			if (null === $n2nLocale->getRegionId()) {
				continue;
			}

			$langId = $n2nLocale->getLanguageId();
			if (isset($this->data[self::TEXTS_KEY][$key][$langId])) {
				return $this->data[self::TEXTS_KEY][$key][$langId];
			}
		}

		return null;
	}
Finds {@see TextT::$str} for given n2nLocales.
null returned if no fitting {@see TextT::$str} found.

@param string $key
@param N2nLocale[] ...$n2nLocales
@return string|null