Views::t

protected static Views::t($string, array $args = array(), array $options = array())

Translates a string to the current language or to a given language.

See the t() documentation for details.

File

core/modules/views/src/Views.php, line 525

Class

Views
Static service container wrapper for views.

Namespace

Drupal\views

Code

protected static function t($string, array $args = array(), array $options = array()) {
  if (empty(static::$translationManager)) {
    static::$translationManager = \Drupal::service('string_translation');
  }

  return static::$translationManager->translate($string, $args, $options);
}
doc_Drupal
2016-10-29 09:54:49
Comments
Leave a Comment

Please login to continue.