Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Views.php

function Views::t

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

See the t() documentation for details.

1 call to Views::t()
Views::getHandlerTypes in core/modules/views/src/Views.php
Provide a list of views handler types used in a view.

File

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

Class

Views
Static service container wrapper for views.

Namespace

Drupal\views

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal