Get translator

@return \Zork\I18n\Translator\Translator
978960
protected function getTranslator()
    {
        if ( null === $this->_translator )
        {
            $this->_translator = $this->getServiceLocator()
                                      ->get( 'Zend\I18n\Translator\Translator' );
        }

        return $this->_translator;
    }
691383
public function getTranslations()
    {
        $translations = array_map(function ($file) {
            return $file['content'];
        }, $this->files);

        return Arr::dot($translations);
    }
981643
def get_translator (domain, directory, languages=None,
                    translatorklass=Translator, fallback=False,
                    fallbackklass=NullTranslator):
    """"""
    translator = gettext.translation(domain, localedir=directory,
            languages=languages, class_=translatorklass, fallback=fallback)
    if not isinstance(translator, gettext.GNUTranslations) and fallbackklass:
        translator = fallbackklass()
    return translator
692909
public function getTranslateForm()
    {
        if ($this->translateForm === null) {
            $this->translateForm = $this->getServiceLocator()->get('playgroundtranslate_translate_form');
        }
        return $this->translateForm;
    }
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];
    }
331096
public static function GetInstance() : Translator
   {

      if ( null === self::$_instance )
      {
         self::$_instance = new Translator();
      }

      return self::$_instance;

   }
305850
protected function getTranslateHelper()
    {
        if ( $this->translateHelper )
        {
            return $this->translateHelper;
        }

        if ( method_exists( $this->view, 'plugin' ) )
        {
            $this->translateHelper = $this->view
                                          ->plugin( 'translate' );
        }

        if ( ! $this->translateHelper instanceof Translate )
        {
            $this->translateHelper = new Translate();
        }

        return $this->translateHelper;
    }
1239124
public function getType()
    {
        if ($this->definition->getTranslatable()) {
            return self::TYPE_TRANSLATABLE;
        }
        return strtolower($this->definition->getType());
    }
434210
public function getMainTranslation()
    {
        /** @var eZContentLanguage $language */
        $language = eZContentLanguage::fetch( $this->attribute( 'main_language_id' ) );
        if ( $language instanceof eZContentLanguage )
            return $this->translationByLocale( $language->attribute( 'locale' ) );

        return false;
    }
789541
public function compile()
    {
        $translator = $this
            ->checkNamespace($this->configuration)
            ->checkAlias($this->configuration)
            ->checkMethods($this->configuration)
            ->createTranslator();

        return $translator;
    }
793787
public function getTranslation($locale = 'en_US', ConnectionInterface $con = null)
    {
        if (!isset($this->currentTranslations[$locale])) {
            if (null !== $this->collFeatureTypeI18ns) {
                foreach ($this->collFeatureTypeI18ns as $translation) {
                    if ($translation->getLocale() == $locale) {
                        $this->currentTranslations[$locale] = $translation;

                        return $translation;
                    }
                }
            }
            if ($this->isNew()) {
                $translation = new ChildFeatureTypeI18n();
                $translation->setLocale($locale);
            } else {
                $translation = ChildFeatureTypeI18nQuery::create()
                    ->filterByPrimaryKey(array($this->getPrimaryKey(), $locale))
                    ->findOneOrCreate($con);
                $this->currentTranslations[$locale] = $translation;
            }
            $this->addFeatureTypeI18n($translation);
        }

        return $this->currentTranslations[$locale];
    }
1126015
public function getI18n()
    {
        if (empty($this->_i18n)) {
            $this->_i18n = $this->prepareI18nModels();
        }
        return $this->_i18n;
    }
397836
final protected function extendTranslatorService()
    {
        $app = $this->getContainer();

        $app['translator'] = $app->share(
            $app->extend(
                'translator',
                function ($translator) {
                    $translations = $this->loadTranslationsFromDefaultPath();
                    if ($translations === null) {
                        return $translator;
                    }
                    foreach ($translations as $translation) {
                        $translator->addResource($translation[0], $translation[1], $translation[2]);
                    }

                    return $translator;
                }
            )
        );
    }
959139
public function getTranslation($locale = 'en_US', ConnectionInterface $con = null)
    {
        if (!isset($this->currentTranslations[$locale])) {
            if (null !== $this->collTeamI18ns) {
                foreach ($this->collTeamI18ns as $translation) {
                    if ($translation->getLocale() == $locale) {
                        $this->currentTranslations[$locale] = $translation;

                        return $translation;
                    }
                }
            }
            if ($this->isNew()) {
                $translation = new ChildTeamI18n();
                $translation->setLocale($locale);
            } else {
                $translation = ChildTeamI18nQuery::create()
                    ->filterByPrimaryKey(array($this->getPrimaryKey(), $locale))
                    ->findOneOrCreate($con);
                $this->currentTranslations[$locale] = $translation;
            }
            $this->addTeamI18n($translation);
        }

        return $this->currentTranslations[$locale];
    }
58233
public function Master()
    {
        if (Translatable::get_current_locale() != Translatable::default_locale()) {
            if ($master = $this->owner->getTranslation(Translatable::default_locale())) {
                return $master;
            }
        }

        return $this->owner;
    }
518274
public function getTranslator($component)
    {
        if (isset($this->locale)) {
            $domain = str_replace('\\', '_', ltrim($component, '\\'));
            $localedir = static::getBaseDir($component);
            return \Erebot\Intl\GettextFactory::translation($domain, $localedir, array($this->locale));
        }

        if ($this->proxified === $this) {
            throw new \Erebot\NotFoundException('No translator associated');
        }

        return $this->proxified->getTranslator($component);
    }
584014
public static function translator()
    {
        if (!isset(self::core()->translator)) {
            //====================================================================//
            // Initialize Tasks List
            self::core()->translator = new Translator();
        }

        return self::core()->translator;
    }