Renders the translated text using the XBlock i18n service, if available.
335727
def render(self, context):
        
        with self.merge_translation(context):
            django_translated = self.do_translate.render(context)

        return django_translated
1171570
protected function renderMainContent()
    {
        echo Html::beginTag('div', ['class' => 'social-login']);

        echo Html::tag('h2', Yii::t('users', 'Add social service'));

        foreach ($this->getClients() as $externalService) {
            if (!in_array(get_class($externalService), array_keys($this->services))) {
                $socialServiceId = SocialService::classNameToId(get_class($externalService));
                $i18n = SocialService::i18nNameById($socialServiceId);
                $this->clientLink(
                    $externalService,
                    '<i class="demo-icon icon-basic-' . $externalService->getName() . '"></i>',
                    [
                        'class' => "social-login__social-network social-login__social-network--"
                            . $externalService->getName(),
                        'title' => $i18n,
                    ]
                );
            }
        }
        echo Html::endTag('div');

        echo Html::tag('div', '', ['class' => 'clearfix']);
    }
554286
public function render()
    {
        parent::render();

        $oLang = \OxidEsales\Eshop\Core\Registry::getLang();

        // remove itm from list
        unset($this->_aViewData["sumtype"][2]);

        // Deliverytypes
        $aDelTypes = $this->getDeliveryTypes();

        $soxId = $this->_aViewData["oxid"] = $this->getEditObjectId();
        if (isset($soxId) && $soxId != "-1") {
            // load object
            $oDelivery = oxNew(\OxidEsales\Eshop\Application\Model\Delivery::class);
            $oDelivery->loadInLang($this->_iEditLang, $soxId);

            $oOtherLang = $oDelivery->getAvailableInLangs();
            if (!isset($oOtherLang[$this->_iEditLang])) {
                // echo "language entry doesn't exist! using: ".key($oOtherLang);
                $oDelivery->loadInLang(key($oOtherLang), $soxId);
            }

            $this->_aViewData["edit"] = $oDelivery;

            //Disable editing for derived articles
            if ($oDelivery->isDerived()) {
                $this->_aViewData['readonly'] = true;
            }

            // remove already created languages
            $aLang = array_diff($oLang->getLanguageNames(), $oOtherLang);
            if (count($aLang)) {
                $this->_aViewData["posslang"] = $aLang;
            }

            foreach ($oOtherLang as $id => $language) {
                $oLang = new stdClass();
                $oLang->sLangDesc = $language;
                $oLang->selected = ($id == $this->_iEditLang);
                $this->_aViewData["otherlang"][$id] = clone $oLang;
            }

            // set selected delivery type
            if (!$oDelivery->oxdelivery__oxdeltype->value) {
                $oDelivery->oxdelivery__oxdeltype = new \OxidEsales\Eshop\Core\Field("a"); // default
            }
            $aDelTypes[$oDelivery->oxdelivery__oxdeltype->value]->selected = true;
        }

        $this->_aViewData["deltypes"] = $aDelTypes;

        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("aoc")) {
            $oDeliveryMainAjax = oxNew(\OxidEsales\Eshop\Application\Controller\Admin\DeliveryMainAjax::class);
            $this->_aViewData['oxajax'] = $oDeliveryMainAjax->getColumns();

            return "popups/delivery_main.tpl";
        }

        return "delivery_main.tpl";
    }
857241
public function render()
    {
        parent::render();

        $sOxId = $this->_aViewData["oxid"] = $this->getEditObjectId();
        //loading languages info from config
        $this->_aLangData = $this->_getLanguages();

        if (isset($sOxId) && $sOxId != "-1") {
            //checking if translations files exists
            $this->_checkLangTranslations($sOxId);
            $this->_aViewData["edit"] = $this->_getLanguageInfo($sOxId);
        }

        return "language_main.tpl";
    }
1278968
function Page() {
  const { t, i18n } = useTranslation();

  const changeLanguage = lng => {
    i18n.changeLanguage(lng);
  };

  return (
    <div className="App">
      <div className="App-header">
        <img src={logo} className="App-logo" alt="logo" />
        <Welcome />
      </div>
      <div className="App-intro">
        <div>
          <button onClick={() => changeLanguage('de')}>de</button>
          <button onClick={() => changeLanguage('en')}>en</button>
        </div>
        <MyComponent />
      </div>
      <div>{t('description.part2')}</div>
    </div>
  );
}
1256016
public function render()
    {
        parent::render();

        $soxId = $this->_aViewData["oxid"] = $this->getEditObjectId();
        if (isset($soxId) && $soxId != "-1") {
            // load object
            $oNews = oxNew(\OxidEsales\Eshop\Application\Model\News::class);
            $oNews->loadInLang($this->_iEditLang, $soxId);

            $oOtherLang = $oNews->getAvailableInLangs();
            if (!isset($oOtherLang[$this->_iEditLang])) {
                // echo "language entry doesn't exist! using: ".key($oOtherLang);
                $oNews->loadInLang(key($oOtherLang), $soxId);
            }
            $this->_aViewData["edit"] = $oNews;

            //Disable editing for derived items
            if ($oNews->isDerived()) {
                $this->_aViewData['readonly'] = true;
            }

            // remove already created languages
            $this->_aViewData["posslang"] = array_diff(\OxidEsales\Eshop\Core\Registry::getLang()->getLanguageNames(), $oOtherLang);

            foreach ($oOtherLang as $id => $language) {
                $oLang = new stdClass();
                $oLang->sLangDesc = $language;
                $oLang->selected = ($id == $this->_iEditLang);
                $this->_aViewData["otherlang"][$id] = clone $oLang;
            }
        }
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("aoc")) {
            $oNewsMainAjax = oxNew(\OxidEsales\Eshop\Application\Controller\Admin\NewsMainAjax::class);
            $this->_aViewData['oxajax'] = $oNewsMainAjax->getColumns();

            return "popups/news_main.tpl";
        }

        return "news_main.tpl";
    }
1009749
protected function renderContent() {    
        if($this->data->get('has_stats', false)) {
            $html = I18N::translate('%1$s visits since the beginning of %2$s<br>(%3$s today)' ,
                '<span class="odometer">' . I18N::number($this->data->get('visits_year')) . '</span>',
                date('Y'),
                '<span class="odometer">' . I18N::number($this->data->get('visits_today')) . '</span>'
                );
        }
        else {
            $html = I18N::translate('No statistics could be retrieved from Piwik.');
        }
        
        return $html;
    }
1070919
function  {
  var data = {};

  init();

  if (cache.defaultTranslation[defaultLocale]) {
    return cache.defaultTranslation[defaultLocale];
  }

  assertReactElements(reactElements);

  // Load i18n content.
  loadCldr(defaultLocale);

  // Set default locale.
  Globalize.locale(defaultLocale);

  // Have react to render all passed components, therefore the formatters in
  // use will be created in Globalize.cache.
  _reactElements(reactElements).forEach(function(reactElement) {
    React.renderToString(reactElement);
  });

  data[Globalize.cldr.attributes.bundle] = Globalize.cldr.get("globalize-messages/{bundle}");

  return cache.defaultTranslation[defaultLocale] = data;
}
710320
def _render(self, text):
        ''''''
        parser = commonmark.Parser()
        ast = parser.parse(text)
        renderer = HtmlRenderer(self)
        html = renderer.render(ast)
        return html
1079280
protected function renderXmlOutput()
    {
        $message = $this->translator()->translate('Method not allowed. Must be one of: {{ methods }}', [
            '{{ methods }}' => $this->getMethods()
        ], 'charcoal');

        return $this->renderTemplate('<root><message>'.$message.'</message></root>');
    }
525825
private void renderMsgFromTranslation(
      MsgNode msg, ImmutableList<SoyMsgPart> msgParts, @Nullable ULocale locale) {
    SoyMsgPart firstPart = msgParts.get(0);

    if (firstPart instanceof SoyMsgPluralPart) {
      new PlrselMsgPartsVisitor(msg, locale).visitPart((SoyMsgPluralPart) firstPart);

    } else if (firstPart instanceof SoyMsgSelectPart) {
      new PlrselMsgPartsVisitor(msg, locale).visitPart((SoyMsgSelectPart) firstPart);

    } else {
      for (SoyMsgPart msgPart : msgParts) {

        if (msgPart instanceof SoyMsgRawTextPart) {
          RenderVisitor.append(
              master.getCurrOutputBufForUseByAssistants(),
              ((SoyMsgRawTextPart) msgPart).getRawText());

        } else if (msgPart instanceof SoyMsgPlaceholderPart) {
          String placeholderName = ((SoyMsgPlaceholderPart) msgPart).getPlaceholderName();
          visit(msg.getRepPlaceholderNode(placeholderName));

        } else {
          throw new AssertionError();
        }
      }
    }
  }
229106
function translate(content, langFile) {
  return content.replace(templateRegEx, function (match, capture) {
    return (0, _lodash2.default)(langMap.get(langFile), capture);
  });
}
126526
public function render(
        $content,
        array $attribs = [],
        ElementInterface $element = null,
        FormInterface $form = null
    ) {
        $legendHelper = $this->getLegendHelper();

        if ($legendHelper instanceof TranslatorAwareInterface) {
            $rollbackTextDomain = $legendHelper->getTranslatorTextDomain();
            $legendHelper->setTranslatorTextDomain($this->getTranslatorTextDomain());
        }

        $content = $legendHelper(
                $element,
                [],
                $element,
                $form
            ) . $content;

        if (isset($rollbackTextDomain)) {
            $legendHelper->setTranslatorTextDomain($rollbackTextDomain);
        }

        return parent::render($content, $attribs);
    }
182158
protected function render ()
  {
    $prop          = $this->props;
    $content       = exists ($prop->value) ? $prop->value : $this->getChildren ();
    $blocksService = $this->context->getBlocksService ();

    if ($prop->preRender && is_array ($content))
      $content = $this->attachSetAndGetContent ($content);

    if (exists ($name = $prop->of)) {
      if (!preg_match ('/^\w+$/', $name))
        throw new ComponentException($this, "Invalid block name: <kbd>$name</kbd>");
      if ($prop->byDefault && $blocksService->hasBlock ($name))
        return;
      $blocksService->getBlock ($name)->set ($content);
    }
    elseif (exists ($name = $prop->appendTo)) {
      if ($prop->byDefault && $blocksService->hasBlock ($name))
        return;
      $blocksService->getBlock ($name)->append ($content);
    }
    elseif (exists ($name = $prop->prependTo)) {
      if ($prop->byDefault && $blocksService->hasBlock ($name))
        return;
      $blocksService->getBlock ($name)->prepend ($content);
    }
    else throw new ComponentException($this,
      "One of these properties must be set:<p><kbd>of | appendTo | prependTo</kbd>");
  }
711612
function Render()
    {
        if (!self::Guard()->Allow(Action::Read(), $this->content))
        {
            return '';
        }
        ContentTranslator::Singleton()->SetContent($this->content);
        $module = ClassFinder::CreateFrontendModule($this->content->GetType());
        $module->SetTreeItem($this->tree, $this->item);
        return $module->Render();
    }
1241451
function () {
          for (var key in translationIds) {
            if (translationIds.hasOwnProperty(key)) {
              updateTranslation(key, translationIds[key], scope, scope.interpolateParams, scope.defaultText);
            }
          }
        }
576469
@Override
	public void render( Map<String,String> options ) throws IOException {

		// Keep the options
		this.options = options;

		// Check the language
		this.locale = options.get( DocConstants.OPTION_LOCALE );
		if( this.locale != null )
			this.messages = new Messages( this.locale );
		else
			this.messages = new Messages();

		// What to render?
		if( options.containsKey( DocConstants.OPTION_RECIPE ))
			renderRecipe();
		else
			renderApplication();
	}