Shortcut function alias of $this->translation->getTranslated
@param string            $key
@param object|array|null $parameters
@param string            $fallbackValue
@return type
@todo implemtation
553036
public static function getTranslated(
        $key,
        $parameters = null,
        $fallbackValue = null
    ) {
        return ($fallbackValue !== null ? $fallbackValue : $key);
        /**return self::$translation->getTranslated(
            $key,
            $parameters,
            $fallbackValue
        );*/
    }
513160
public function translate($key, $translation, $locale = null) {
        $this->translations[$this->locale($locale)][$key] = $translation;

        return $translation;
    }
677313
public function trans($key, Array $parameters = array(), $domain = NULL) {
    if (!isset($domain)) $domain = 'project';

    return $this->translationContainer->getTranslator()->trans($key, $parameters, $domain);
  }
946487
protected function fallbackValue($value, $fValue, $fKey)
    {
        return $value != null ? $value : $this->checkValue($fValue, $fKey);
    }
907587
public function server($key = null, $fallback = null)
    {
        return $key
            ? $this->request->server->get($key, $fallback)
            : $this->request->server;
    }
259940
public function get(string $key): TranslationValueInterface
    {
        if (null === $unit = $this->xliff->searchTranslationUnit($key)) {
            throw new TranslationNotFoundException($key, $this);
        }

        return new XliffTranslationValue($this, $unit);
    }
185046
private function getFallbackLocale($locale = null)
    {
        if ($locale && $this->isLocaleCountryBased($locale)) {
            if ($fallback = $this->getLanguageFromCountryBasedLocale($locale)) {
                return $fallback;
            }
        }

        $locales = $this->getLocales();

        foreach ($locales as $code) {
            if ($this->getTranslationByLocaleKey($code) !== null)
                return $code;
        }

        return app()->make('config')->get('revy.translatable.fallback_locale');
    }
696434
protected function translate($key, $params = null, $language = null) {
		return Translation :: translate($key, $params, $language, $this -> getViewmodel());
	}
252367
public function cookies($key = null, $fallback = null)
    {
        return $key
            ? $this->request->cookies->get($key, $fallback)
            : $this->request->cookies;
    }
739952
public function getTranslator($type, array $params = [])
    {
        $result = null;

        if (!isset($params['language'])) {
            throw new \Exception('Need \'language\' param');
        }
        switch ($type) {
            case interfaces\Translator::TRANSLATOR_FILE:
                $result = new FileTranslator();
                if (!isset($params['dir'])) {
                    throw new \Exception('Need \'dir\' param');
                }
                $result->setDir($params['dir']);
                $result->setLanguage($params['language']);
                break;
            case interfaces\Translator::TRANSLATOR_ARRAY:
                $result = new ArrayTranslator();
                if (!isset($params['map'])) {
                    throw new \Exception('Need \'map\' param');
                }
                $result->setMap($params['map']);
                $result->setLanguage($params['language']);
                break;
            case interfaces\Translator::TRANSLATOR_DB:
                $result = new DBTranslator();
                if (!isset($params['aliasFieldName'])) {
                    throw new \Exception('Need \'aliasFieldName\' param');
                }
                if (!isset($params['languageFieldName'])) {
                    throw new \Exception('Need \'languageFieldName\' param');
                }
                if (!isset($params['resultFieldName'])) {
                    throw new \Exception('Need \'resultFieldName\' param');
                }
                if (!isset($params['table'])) {
                    throw new \Exception('Need \'table\' param');
                }
                if (!isset($params['connection'])) {
                    throw new \Exception('Need \'connection\' param');
                }
                $result->setAliasFieldName($params['aliasFieldName']);
                $result->setResultFieldName($params['resultFieldName']);
                $result->setTableName($params['table']);
                $result->setLanguageFieldName($params['languageFieldName']);
                $result->setQueryBuilder(\pwf\basic\db\QueryBuilder::select()
                        ->setConditionBuilder(\pwf\basic\db\QueryBuilder::getConditionBuilder()));
                $result->setConnection(is_string($params['connection']) ? \pwf\basic\Application::$instance->getComponent($params['connection'])
                            : $params['connection']);
                $result->setLanguage($params['language']);
                break;
        }

        return $result;
    }
967128
public static function translate($key, array $params = [], $default = '')
    {
        $result = Application::$instance->getComponent('i18n')->translate($key,
            $params);

        return empty($result) ? self::prepareValueS($default, $params) : $result;
    }
389610
public function translate($key, $defaultValue = '', $locale = null) {
		return $this->translation->translate($key, $defaultValue, $locale);
	}
584691
public function getTranslation($locale = null, $withFallback = null)
    {
        $configFallbackLocale = $this->getFallbackLocale();
        $locale = $locale ?: $this->locale();
        $withFallback = $withFallback === null ? $this->useFallback() : $withFallback;
        $fallbackLocale = $this->getFallbackLocale($locale);

        if ($translation = $this->getTranslationByLocaleKey($locale)) {
            return $translation;
        }
        if ($withFallback && $fallbackLocale) {
            if ($translation = $this->getTranslationByLocaleKey($fallbackLocale)) {
                return $translation;
            }
            if ($fallbackLocale !== $configFallbackLocale && $translation = $this->getTranslationByLocaleKey($configFallbackLocale)) {
                return $translation;
            }
        }

        return null;
    }
701296
protected function setCurrentTranslation($fallback = false)
    {
        if (!($this->currentTranslation instanceof LayoutTranslation) || $this->currentTranslation->getLang() != $this->locale) {
            $i = 0;
            $end = count($this->translations);
            $found = false;

            while ($i<$end && !$found) {
                $found = ($this->translations[$i]->getLang() == $this->locale);
                $i++;
            }

            if ($found) {
                $this->currentTranslation = $this->translations[$i-1];
            } else {
                if($fallback && $this->getDefaultLocale()) {
                    $this->setLocale($this->getDefaultLocale());
                    $this->setCurrentTranslation();
                } else {
                    throw new NoTranslationException($this->locale, sprintf('No "%s" translation for layout "%s".', $this->locale, $this->reference));
                }
            }
        }
    }
209454
public function getTranslationAttribute($key, $locale = null, $fallback = true, $unmutated = false)
    {
        if ($this->isTranslationAttribute($key))
        {
            $translation = $this->translate($locale);

            $attribute = ($translation) ?
                ($unmutated ? $translation->getUnmutatedAttribute($key) : $translation->{$key}) :
                null;

            if (empty($attribute) && $fallback)
            {
                $translation = $this->translate($this->getFallbackLocale());

                if ($translation)
                {
                    return $unmutated ? $translation->getUnmutatedAttribute($key) : $translation->{$key};
                }
            }

            return $attribute;
        }

        return null;
    }
1347008
protected function readOption(string $key, $fallback = null)
    {
        $value = get_option($this->prefix . $key, $fallback ?? false);
        if (false === $value) {
            return $fallback;
        }

        return $value;
    }
948506
public function getValueOfCurrentLocaleForKey($key)
    {
        $translations = $this->getAttributeValue($key);
        $currentLocale = config('app.locale');
        $fallbackLocale = config('multilingual.fallback_locale');

        if ( ! $translations) return "";

        if ( ! @$translations[$currentLocale]) {
            return @$translations[$fallbackLocale] ?: '';
        };

        return @$translations[$currentLocale];
    }