Return translation object

@return Zend_Translate_Adapter|null
556871
public function getTranslator()
    {
        if ($this->translatorIsDisabled()) {
            return null;
        }

        if (null === $this->_translator) {
            return self::getDefaultTranslator();
        }

        return $this->_translator;
    }
533329
public function getTranslationByLocale($locale)
    {
        foreach ($this->getTranslations() as $valueTranslation) {
            if ($valueTranslation->getLocale() === $locale) {
                return $valueTranslation;
            }
        }

        return null;
    }
1220210
public function translation()
    {
        if (is_null($this->translationsClass))
            $this->translationsClass = get_class($this) . 'Translations';

        return $this->hasOne($this->translationsClass, 'record_id', 'id')->where('language_code', app()->getLocale());
    }
188840
public function getAvailableLanguages()
    {
        if (!empty($this->owner->{$this->translationsAttribute})) {
            return array_keys($this->owner->{$this->translationsAttribute});
        }
        return null;
    }
972952
protected function classTranslation() {
        if(! $classTranslation = $this['translationClass'])
            $classTranslation = sprintf('App\\%s%s', ucfirst(str_singular($this->getModel()->getTable())), 'Translations');

        return $classTranslation;
    }
681644
public function getTranslator()
    {
        if ($this->translator === NULL) {
            $this->setTranslator(new Translations\FileTranslator);
        }

        return $this->translator;
    }
1105289
public function getTranslation($languageId = null)
    {
        $languageId = request()->get('language_id');
        if (null === $languageId) {
            return $this;
        } else {
            return $this->translations()->whereLanguageId($languageId)->first();
        }  
    }
759756
public function getTranslations($key = null)
    {
        if ($key !== null) {
            $this->guardAgainstNonTranslatableAttribute($key);

            return array_filter(json_decode($this->getAttributeFromArray($key) ?? '' ?: '{}', true) ?: [], function ($value) {
                return $value !== null && $value !== false && $value !== '';
            });
        }

        return array_reduce($this->getTranslatableAttributes(), function ($result, $item) {
            $result[$item] = $this->getTranslations($item);

            return $result;
        });
    }
975028
public function getTranslation($language = null)
    {
        if ($language === null) {
            $language = $this->getLanguage();
        }

        if (!isset($this->_models[$language])) {
            $this->_models[$language] = $this->loadTranslation($language);
        }

        return $this->_models[$language];
    }
597828
public function translateOrFirst($locale = null)
    {
        $translation = $this->translate($locale, true);

        if ( ! $translation)
        {
            $translation = $this->translations->first();
        }

        return $translation;
    }
201146
public function setTranslator($translator = null)
    {
        if ((null === $translator) || ($translator instanceof Zend_Translate_Adapter)) {
            $this->_translator = $translator;
        } elseif ($translator instanceof Zend_Translate) {
            $this->_translator = $translator->getAdapter();
        } else {
            include_once 'Zend/Validate/Exception.php';
            throw new Zend_Validate_Exception('Invalid translator specified');
        }
        return $this;
    }
457528
public function getLocale()
    {
        $language = $this->getLanguage();
        $country = $this->getCountry();

        if (empty($language) || empty($country)) {
            return null;
        }

        return
            strtolower($language->getIso6391())
            . '_' .
            strtoupper($country->getIso2());
    }
241025
public function getTranslationsLocale()
    {
        $localeIso = $this->locale->getIso();

        if (isset($this->localeTranslationAssociations[$localeIso])) {
            return Locale::create($this->localeTranslationAssociations[$localeIso]);
        }

        return $this->locale;
    }
1345358
public function _get($name, $locale=null) {
		$name = strtolower($name);
		
		if(!$locale)
			$locale = $this->getLocale();

		if($this->getDefinition()->hasProperty($name)) {
			if($this->getDefinition()->property($name)->get('i18n') && $locale !== $this->getLocale()) {
				#multiple locales at once
				if(is_array($locale)) {
					$res = [];
					foreach($locale as $locale)
						$res[$locale] = $this->get($name, $locale);
					return $res;
				}
				elseif(isset($this->data['translations'][$locale][$name]))
					return $this->data['translations'][$locale][$name];
				else {
					$this->getDefinition()->trigger('getTranslations', [$this, $name, $locale]);
					if(!isset($this->data['translations'][$locale][$name]))
						return null;
					return $this->data['translations'][$locale][$name];
				}
			}
			elseif(isset($this->data['properties'][$name]))
				return $this->data['properties'][$name];
		}
		elseif(isset($this->data[$name]))
			return $this->data[$name];
	}
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;
    }
489253
private function getTranslatorHelper()
    {
        if(null === $this->translatorHelper) {
            $this->translatorHelper = $this->serviceLocator->get('MvcTranslator');
        }
    
        return $this->translatorHelper;
    }
321296
public function getTranslatorService()
    {
        if (is_null($this->_translatorService)) {
            $translator = new ZendTranslator();
            $translator->addTranslationFilePattern(
                $this->type,
                $this->basePath,
                '%s/'.$this->getMessageFile(),
                $this->domain
            );
            $this->_translatorService = $translator;
        }
        return $this->_translatorService;
    }