You are here

protected function DrupalTranslator::getOptions in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Validation/DrupalTranslator.php \Drupal\Core\Validation\DrupalTranslator::getOptions()

Returns options suitable for use with t().

2 calls to DrupalTranslator::getOptions()
DrupalTranslator::trans in core/lib/Drupal/Core/Validation/DrupalTranslator.php
Translates the given message.
DrupalTranslator::transChoice in core/lib/Drupal/Core/Validation/DrupalTranslator.php
Translates the given choice message by choosing a translation according to a number.

File

core/lib/Drupal/Core/Validation/DrupalTranslator.php, line 105
Contains \Drupal\Core\Validation\DrupalTranslator.

Class

DrupalTranslator
Translates strings using Drupal's translation system.

Namespace

Drupal\Core\Validation

Code

protected function getOptions($domain = NULL, $locale = NULL) {

  // We do not support domains, so we ignore this parameter.
  // If locale is left NULL, t() will default to the interface language.
  $locale = isset($locale) ? $locale : $this->locale;
  return array(
    'langcode' => $locale,
  );
}