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

1
2
3
4
5
6
7
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
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.