diff --git a/geshifield/src/Plugin/Field/FieldWidget/GeshiFieldDefaultWidget.php b/geshifield/src/Plugin/Field/FieldWidget/GeshiFieldDefaultWidget.php
index 68d89d1..2fd157e 100644
--- a/geshifield/src/Plugin/Field/FieldWidget/GeshiFieldDefaultWidget.php
+++ b/geshifield/src/Plugin/Field/FieldWidget/GeshiFieldDefaultWidget.php
@@ -27,12 +27,12 @@ class GeshiFieldDefaultWidget extends WidgetBase {
     $enabled_languages = GeshiFilter::getEnabledLanguages();
 
     $element['sourcecode'] = array(
-      '#title' => t('Code'),
+      '#title' => $this->t('Code'),
       '#type' => 'textarea',
       '#default_value' => isset($items[$delta]->sourcecode) ? $items[$delta]->sourcecode : NULL,
     );
     $element['language'] = array(
-      '#title' => t('Language'),
+      '#title' => $this->t('Language'),
       '#type' => 'select',
       '#default_value' => isset($items[$delta]->language) ? $items[$delta]->language : NULL,
       '#options' => $enabled_languages,
diff --git a/src/Controller/GeshiFilterConflicts.php b/src/Controller/GeshiFilterConflicts.php
index 8546031..302c9a8 100644
--- a/src/Controller/GeshiFilterConflicts.php
+++ b/src/Controller/GeshiFilterConflicts.php
@@ -17,7 +17,7 @@ class GeshiFilterConflicts extends ControllerBase {
     if (count($conflicts) == 0) {
       $build = array(
         '#type' => 'markup',
-        '#markup' => t('No conflicts found.'),
+        '#markup' => $this->t('No conflicts found.'),
       );
       return $build;
     }
diff --git a/src/Form/GeshiFilterLanguagesForm.php b/src/Form/GeshiFilterLanguagesForm.php
index 437db06..dea9e2c 100644
--- a/src/Form/GeshiFilterLanguagesForm.php
+++ b/src/Form/GeshiFilterLanguagesForm.php
@@ -102,7 +102,7 @@ class GeshiFilterLanguagesForm extends ConfigFormBase {
           foreach ($tags2 as $tag2) {
             if ($tag1 == $tag2) {
               $name = "language[{$language2}][tags]";
-              $form_state->setErrorByName($name, t('The language tags should differ between languages and from the generic tags.'));
+              $form_state->setErrorByName($name, $this->t('The language tags should differ between languages and from the generic tags.'));
             }
           }
         }
@@ -161,16 +161,16 @@ class GeshiFilterLanguagesForm extends ConfigFormBase {
     $config = $this->config('geshifilter.settings');
     $form = array();
     $header = array(
-      t('Language'),
-      t('GeSHi language code'),
+      $this->t('Language'),
+      $this->t('GeSHi language code'),
     );
     if ($add_tag_option) {
-      $header[] = t('Tag/language attribute value');
+      $header[] = $this->t('Tag/language attribute value');
     }
     $form['language'] = array(
       '#type' => 'table',
       '#header' => $header,
-      '#empty' => t('Nome language is available.'),
+      '#empty' => $this->t('Nome language is available.'),
     );
 
     // Table body.
diff --git a/src/Form/GeshiFilterSettingsForm.php b/src/Form/GeshiFilterSettingsForm.php
index 91af7f7..ddbf3a9 100644
--- a/src/Form/GeshiFilterSettingsForm.php
+++ b/src/Form/GeshiFilterSettingsForm.php
@@ -51,9 +51,9 @@ class GeshiFilterSettingsForm extends ConfigFormBase {
     // library).
     $form['library'] = array(
       '#type' => 'fieldset',
-      '#title' => defined('GESHI_VERSION') ? t('GeSHi library version @version detected', array('@version' => GESHI_VERSION)) : t('GeSHi library'),
-      '#description' => t('The GeSHi filter requires the GeSHi library (which needs to be @downloaded and installed seperately).', array(
-        '@downloaded' => \Drupal::l(t('downloaded'), Url::fromUri('http://qbnz.com/highlighter/')),
+      '#title' => defined('GESHI_VERSION') ? $this->t('GeSHi library version @version detected', array('@version' => GESHI_VERSION)) : $this->t('GeSHi library'),
+      '#description' => $this->t('The GeSHi filter requires the GeSHi library (which needs to be @downloaded and installed seperately).', array(
+        '@downloaded' => \Drupal::l($this->t('downloaded'), Url::fromUri('http://qbnz.com/highlighter/')),
       )),
       '#collapsible' => TRUE,
       '#collapsed' => $geshi_library['loaded'],
@@ -64,14 +64,14 @@ class GeshiFilterSettingsForm extends ConfigFormBase {
       // Option for flushing the GeSHi language definition cache.
       $form['library']['language_definition_caching'] = array(
         '#type' => 'item',
-        '#title' => t('GeSHi language definition caching'),
-        '#description' => t('The GeSHi library uses languages definition files to define the properties and highlight rules of the supported languages. In most scenarios these language definition files do not change and a lot of derivative data, such as the list of available languages or the CSS style sheet, can be cached for efficiency reasons. Sometimes however, this cache needs to be flushed and the languages definition files need to be reparsed, for example after an upgrade of the GeSHi library or after adding/editing some language definition files manually.'),
+        '#title' => $this->t('GeSHi language definition caching'),
+        '#description' => $this->t('The GeSHi library uses languages definition files to define the properties and highlight rules of the supported languages. In most scenarios these language definition files do not change and a lot of derivative data, such as the list of available languages or the CSS style sheet, can be cached for efficiency reasons. Sometimes however, this cache needs to be flushed and the languages definition files need to be reparsed, for example after an upgrade of the GeSHi library or after adding/editing some language definition files manually.'),
       );
       // Non-submitting button for flushing the GeSHi language definition file
       // cache.
       $form['library']['language_definition_caching']['flush_language_definition_cache'] = array(
         '#type' => 'button',
-        '#value' => t("Flush the GeSHi language definition cache"),
+        '#value' => $this->t("Flush the GeSHi language definition cache"),
         '#executes_submit_callback' => TRUE,
         '#submit' => array('::flushLanguageDefinitionCache'),
       );
@@ -79,16 +79,16 @@ class GeshiFilterSettingsForm extends ConfigFormBase {
       // GeSHi filter tags and delimiters options.
       $form['tag_options'] = array(
         '#type' => 'fieldset',
-        '#title' => t('GeSHi filter tags and delimiters'),
+        '#title' => $this->t('GeSHi filter tags and delimiters'),
         '#collapsible' => TRUE,
       );
       // Usage of format specific options.
       $form['tag_options']['use_format_specific_options'] = array(
         '#type' => 'checkbox',
-        '#title' => t('Use text format specific tag settings.'),
+        '#title' => $this->t('Use text format specific tag settings.'),
         '#default_value' => $config->get('use_format_specific_options', FALSE),
-        '#description' => t('Enable seperate tag settings of the GeSHi filter for each @text-format instead of global tag settings.', array(
-          '@text-format' => \Drupal::l(t('text format'), Url::fromRoute('filter.admin_overview')),
+        '#description' => $this->t('Enable seperate tag settings of the GeSHi filter for each @text-format instead of global tag settings.', array(
+          '@text-format' => \Drupal::l($this->t('text format'), Url::fromRoute('filter.admin_overview')),
         )),
       );
       // Generic tags settings.
@@ -101,45 +101,45 @@ class GeshiFilterSettingsForm extends ConfigFormBase {
       // GeSHi filter highlighting options.
       $form['highlighting_options'] = array(
         '#type' => 'fieldset',
-        '#title' => t('Syntax highlighting options'),
+        '#title' => $this->t('Syntax highlighting options'),
         '#collapsible' => TRUE,
       );
       // Default language.
       $languages = GeshiFilter::getEnabledLanguages();
       $form['highlighting_options']['default_highlighting'] = array(
         '#type' => 'select',
-        '#title' => t('Default highlighting mode'),
+        '#title' => $this->t('Default highlighting mode'),
         '#default_value' => $config->get('default_highlighting'),
         '#options' => array(
-          (string) t('No highlighting') => array(
-            GeshiFilter::DEFAULT_DONOTHING => t('Do nothing'),
-            GeshiFilter::DEFAULT_PLAINTEXT => t('As plain text'),
+          (string) $this->t('No highlighting') => array(
+            GeshiFilter::DEFAULT_DONOTHING => $this->t('Do nothing'),
+            GeshiFilter::DEFAULT_PLAINTEXT => $this->t('As plain text'),
           ),
-          (string) t('Languages') => $languages,
+          (string) $this->t('Languages') => $languages,
         ),
-        '#description' => t('Select the default highlighting mode to use when no language is defined with a language attribute in the tag.'),
+        '#description' => $this->t('Select the default highlighting mode to use when no language is defined with a language attribute in the tag.'),
       );
       // Default line numbering scheme.
       $form['highlighting_options']['default_line_numbering'] = array(
         '#type' => 'select',
-        '#title' => t('Default line numbering'),
+        '#title' => $this->t('Default line numbering'),
         '#default_value' => $config->get('default_line_numbering'),
         '#options' => array(
-          GeshiFilter::LINE_NUMBERS_DEFAULT_NONE => t('no line numbers'),
-          GeshiFilter::LINE_NUMBERS_DEFAULT_NORMAL => t('normal line numbers'),
-          GeshiFilter::LINE_NUMBERS_DEFAULT_FANCY5 => t('fancy line numbers (every @n lines)', array('@n' => GeshiFilter::LINE_NUMBERS_DEFAULT_FANCY5)),
-          GeshiFilter::LINE_NUMBERS_DEFAULT_FANCY10 => t('fancy line numbers (every @n lines)', array('@n' => GeshiFilter::LINE_NUMBERS_DEFAULT_FANCY10)),
-          GeshiFilter::LINE_NUMBERS_DEFAULT_FANCY20 => t('fancy line numbers (every @n lines)', array('@n' => GeshiFilter::LINE_NUMBERS_DEFAULT_FANCY20)),
+          GeshiFilter::LINE_NUMBERS_DEFAULT_NONE => $this->t('no line numbers'),
+          GeshiFilter::LINE_NUMBERS_DEFAULT_NORMAL => $this->t('normal line numbers'),
+          GeshiFilter::LINE_NUMBERS_DEFAULT_FANCY5 => $this->t('fancy line numbers (every @n lines)', array('@n' => GeshiFilter::LINE_NUMBERS_DEFAULT_FANCY5)),
+          GeshiFilter::LINE_NUMBERS_DEFAULT_FANCY10 => $this->t('fancy line numbers (every @n lines)', array('@n' => GeshiFilter::LINE_NUMBERS_DEFAULT_FANCY10)),
+          GeshiFilter::LINE_NUMBERS_DEFAULT_FANCY20 => $this->t('fancy line numbers (every @n lines)', array('@n' => GeshiFilter::LINE_NUMBERS_DEFAULT_FANCY20)),
         ),
-        '#description' => t('Select the default line numbering scheme: no line numbers, normal line numbers or fancy line numbers. With fancy line numbers every n<sup>th</sup> line number is highlighted. (GeSHi documentation: @line-numbers).', array(
-          '@line-numbers' => \Drupal::l(t('Line numbers'), Url::fromUri('http://qbnz.com/highlighter/geshi-doc.html#line-numbers')),
+        '#description' => $this->t('Select the default line numbering scheme: no line numbers, normal line numbers or fancy line numbers. With fancy line numbers every n<sup>th</sup> line number is highlighted. (GeSHi documentation: @line-numbers).', array(
+          '@line-numbers' => \Drupal::l($this->t('Line numbers'), Url::fromUri('http://qbnz.com/highlighter/geshi-doc.html#line-numbers')),
         )),
       );
       // Highlight_string usage option.
       $form['highlighting_options']['use_highlight_string_for_php'] = array(
         '#type' => 'checkbox',
-        '#title' => t('Use built-in PHP function <code>highlight_string()</code> for PHP source code.'),
-        '#description' => t('When enabled, PHP source code will be syntax highlighted with the built-in PHP function <code>@highlight-string</code> instead of with the GeSHi library. GeSHi features, like line numbering and usage of an external CSS stylesheet for example, are not available.', array(
+        '#title' => $this->t('Use built-in PHP function <code>highlight_string()</code> for PHP source code.'),
+        '#description' => $this->t('When enabled, PHP source code will be syntax highlighted with the built-in PHP function <code>@highlight-string</code> instead of with the GeSHi library. GeSHi features, like line numbering and usage of an external CSS stylesheet for example, are not available.', array(
           '@highlight-string' => \Drupal::l('highlight_string()', Url::fromUri('http://php.net/manual/en/function.highlight-string.php')),
         )),
         '#default_value' => $config->get('use_highlight_string_for_php'),
@@ -147,9 +147,9 @@ class GeshiFilterSettingsForm extends ConfigFormBase {
       // Option to disable Keyword URL's.
       $form['highlighting_options']['enable_keyword_urls'] = array(
         '#type' => 'checkbox',
-        '#title' => t('Enable GeSHi keyword URLs'),
-        '#description' => t('For some languages GeSHi can link language keywords (e.g. standard library functions) to their online documentation. (GeSHi documentation: @keyword-urls).', array(
-          '@keyword-urls' => \Drupal::l(t('Keyword URLs'), Url::fromUri('http://qbnz.com/highlighter/geshi-doc.html#keyword-urls')),
+        '#title' => $this->t('Enable GeSHi keyword URLs'),
+        '#description' => $this->t('For some languages GeSHi can link language keywords (e.g. standard library functions) to their online documentation. (GeSHi documentation: @keyword-urls).', array(
+          '@keyword-urls' => \Drupal::l($this->t('Keyword URLs'), Url::fromUri('http://qbnz.com/highlighter/geshi-doc.html#keyword-urls')),
         )),
         '#default_value' => $config->get('enable_keyword_urls'),
       );
@@ -157,21 +157,21 @@ class GeshiFilterSettingsForm extends ConfigFormBase {
       // Styling, layout and CSS.
       $form['styling'] = array(
         '#type' => 'fieldset',
-        '#title' => t('Styling, layout and CSS'),
+        '#title' => $this->t('Styling, layout and CSS'),
         '#collapsible' => TRUE,
       );
 
       // CSS mode.
       $form['styling']['css_mode'] = array(
         '#type' => 'radios',
-        '#title' => t('CSS mode for syntax highlighting'),
+        '#title' => $this->t('CSS mode for syntax highlighting'),
         '#options' => array(
-          GeshiFilter::CSS_INLINE => t('Inline CSS style attributes.'),
-          GeshiFilter::CSS_CLASSES_AUTOMATIC => t('Use CSS classes and an automatically managed external CSS style sheet.'),
-          GeshiFilter::CSS_CLASSES_ONLY => t('Only add CSS classes to the markup.'),
+          GeshiFilter::CSS_INLINE => $this->t('Inline CSS style attributes.'),
+          GeshiFilter::CSS_CLASSES_AUTOMATIC => $this->t('Use CSS classes and an automatically managed external CSS style sheet.'),
+          GeshiFilter::CSS_CLASSES_ONLY => $this->t('Only add CSS classes to the markup.'),
         ),
         '#default_value' => $config->get('css_mode', GeshiFilter::CSS_INLINE),
-        '#description' => t('Inline CSS is easier to set up, does not depend on
+        '#description' => $this->t('Inline CSS is easier to set up, does not depend on
           an external style sheets and is consequently more robust to copy/paste
           operations like content aggregation. However, usage of CSS classes and
           an external stylesheet requires much less markup code and bandwidth.
@@ -183,28 +183,28 @@ class GeshiFilterSettingsForm extends ConfigFormBase {
           rules to the pages (e.g. based on @css-defaults).
           (GeSHi documentation: @css-classes).',
           array(
-            '@css-classes' => \Drupal::l(t('Using CSS Classes'),
+            '@css-classes' => \Drupal::l($this->t('Using CSS Classes'),
               Url::fromUri('http://qbnz.com/highlighter/geshi-doc.html#using-css-classes')
             ),
-            '@download-method' => \Drupal::l(t('download method'), Url::fromRoute('system.file_system_settings')),
-            '@css-defaults' => \Drupal::l(t('these defaults'), Url::fromRoute('geshifilter.generate_css')),
+            '@download-method' => \Drupal::l($this->t('download method'), Url::fromRoute('system.file_system_settings')),
+            '@css-defaults' => \Drupal::l($this->t('these defaults'), Url::fromRoute('geshifilter.generate_css')),
           )
         ),
       );
 
       // Code container.
       $container_options = array(
-        GESHI_HEADER_PRE => t('%val: uses a @cnt wrapper, efficient whitespace coding, no automatic line wrapping, generates invalid HTML with line numbering.', array(
+        GESHI_HEADER_PRE => $this->t('%val: uses a @cnt wrapper, efficient whitespace coding, no automatic line wrapping, generates invalid HTML with line numbering.', array(
           '%val' => 'GESHI_HEADER_PRE',
           '@cnt' => '<pre>',
         )),
-        GESHI_HEADER_DIV => t('%val: uses a @cnt wrapper, enables automatic line wrapping.', array(
+        GESHI_HEADER_DIV => $this->t('%val: uses a @cnt wrapper, enables automatic line wrapping.', array(
           '%val' => 'GESHI_HEADER_DIV',
           '@cnt' => '<div>',
         )),
       );
       if (version_compare(GESHI_VERSION, '1.0.8', '>=')) {
-        $container_options[GESHI_HEADER_PRE_VALID] = t('%val: uses @pre
+        $container_options[GESHI_HEADER_PRE_VALID] = $this->t('%val: uses @pre
           wrappers, ensures valid HTML with line numbering, but generates more
           markup.',
           array(
@@ -213,20 +213,20 @@ class GeshiFilterSettingsForm extends ConfigFormBase {
             '@li' => '<li>',
           )
         );
-        $container_options[GESHI_HEADER_PRE_TABLE] = t('%val: uses a @table construction for adding line numbers which avoids selection/copy/paste problems.', array(
+        $container_options[GESHI_HEADER_PRE_TABLE] = $this->t('%val: uses a @table construction for adding line numbers which avoids selection/copy/paste problems.', array(
           '%val' => 'GESHI_HEADER_PRE_TABLE',
           '@table' => '<table>',
         ));
       }
       if (version_compare(GESHI_VERSION, '1.0.7.2', '>=')) {
-        $container_options[GESHI_HEADER_NONE] = t('%val: uses no wrapper.', array('%val' => 'GESHI_HEADER_NONE'));
+        $container_options[GESHI_HEADER_NONE] = $this->t('%val: uses no wrapper.', array('%val' => 'GESHI_HEADER_NONE'));
       }
 
       $form['styling']['code_container'] = array(
         '#type' => 'radios',
-        '#title' => t('Code container, wrapping technique'),
-        '#description' => t('Define the wrapping technique to use for code blocks. (GeSHi documentation: @code-container).',
-          array('@code-container' => \Drupal::l(t('The Code Container'), Url::fromUri('http://qbnz.com/highlighter/geshi-doc.html#the-code-container')))
+        '#title' => $this->t('Code container, wrapping technique'),
+        '#description' => $this->t('Define the wrapping technique to use for code blocks. (GeSHi documentation: @code-container).',
+          array('@code-container' => \Drupal::l($this->t('The Code Container'), Url::fromUri('http://qbnz.com/highlighter/geshi-doc.html#the-code-container')))
         ),
         '#options' => $container_options,
         '#default_value' => $config->get('code_container'),
@@ -293,7 +293,7 @@ class GeshiFilterSettingsForm extends ConfigFormBase {
     }
     $cache = \Drupal::cache();
     $cache->delete('geshifilter_available_languages_cache');
-    drupal_set_message(t('Flushed the GeSHi language definition cache.'));
+    drupal_set_message($this->t('Flushed the GeSHi language definition cache.'));
   }
 
   /**
@@ -308,35 +308,35 @@ class GeshiFilterSettingsForm extends ConfigFormBase {
     // Generic tags.
     $form["tags"] = array(
       '#type' => 'textfield',
-      '#title' => t('Generic syntax highlighting tags'),
+      '#title' => $this->t('Generic syntax highlighting tags'),
       '#default_value' => $this->tags(),
-      '#description' => t('Tags that should activate the GeSHi syntax highlighting. Specify a space-separated list of tagnames.'),
+      '#description' => $this->t('Tags that should activate the GeSHi syntax highlighting. Specify a space-separated list of tagnames.'),
     );
 
     // Container tag styles.
     $form["tag_styles"] = array(
       '#type' => 'checkboxes',
-      '#title' => t('Container tag style'),
+      '#title' => $this->t('Container tag style'),
       '#options' => array(
         GeshiFilter::BRACKETS_ANGLE => '<code>' . htmlentities('<foo> ... </foo>') . '</code>',
         GeshiFilter::BRACKETS_SQUARE => '<code>[foo] ... [/foo]</code>',
         GeshiFilter::BRACKETS_DOUBLESQUARE => '<code>[[foo]] ... [[/foo]]</code>',
-        GeshiFilter::BRACKETS_PHPBLOCK => t('PHP style source code blocks: <code>@php</code> and <code>@percent</code>', array(
+        GeshiFilter::BRACKETS_PHPBLOCK => $this->t('PHP style source code blocks: <code>@php</code> and <code>@percent</code>', array(
           '@php' => '<?php ... ?>',
           '@percent' => '<% ... %>',
         )),
       ),
       '#default_value' => $this->tagStyles(),
-      '#description' => t('Select the container tag styles that should trigger GeSHi syntax highlighting.'),
+      '#description' => $this->t('Select the container tag styles that should trigger GeSHi syntax highlighting.'),
     );
 
     // Setting to decode entities, see https://www.drupal.org/node/2047021.
     $config = $this->config('geshifilter.settings');
     $form["decode_entities"] = array(
       '#type' => 'checkbox',
-      '#title' => t('Decode entities'),
+      '#title' => $this->t('Decode entities'),
       '#default_value' => $config->get('decode_entities'),
-      '#description' => t('Decode entities, for example, if the code has been typed in a WYSIWYG editor.'),
+      '#description' => $this->t('Decode entities, for example, if the code has been typed in a WYSIWYG editor.'),
     );
     return $form;
   }
diff --git a/src/GeshiFilterCss.php b/src/GeshiFilterCss.php
index 8283ebf..a49507c 100644
--- a/src/GeshiFilterCss.php
+++ b/src/GeshiFilterCss.php
@@ -79,7 +79,7 @@ class GeshiFilterCss {
       }
     }
     else {
-      drupal_set_message(t('Error while generating CSS rules: could not load GeSHi library.'), 'error');
+      drupal_set_message($this->t('Error while generating CSS rules: could not load GeSHi library.'), 'error');
     }
     return $output;
   }
@@ -107,7 +107,7 @@ class GeshiFilterCss {
         drupal_set_message(t('(Re)generated external CSS style sheet %file.', array('%file' => $ret->getFilename())));
       }
       else {
-        drupal_set_message(t('Could not generate external CSS file. Check the settings of your <a href="!filesystem">file system</a>.',
+        drupal_set_message($t('Could not generate external CSS file. Check the settings of your <a href="!filesystem">file system</a>.',
           array(
             '!filesystem' => Url::fromRoute('system.file_system_settings')->toString(),
           )), 'error');
diff --git a/src/Plugin/Filter/GeshiFilterFilter.php b/src/Plugin/Filter/GeshiFilterFilter.php
index 6d3c4f8..8aad538 100644
--- a/src/Plugin/Filter/GeshiFilterFilter.php
+++ b/src/Plugin/Filter/GeshiFilterFilter.php
@@ -208,7 +208,7 @@ class GeshiFilterFilter extends FilterBase {
       $tag_style_examples[] = '<code>' . SafeMarkup::checkPlain('[[foo]]') . '</code>';
     }
     if (!$bracket_open) {
-      drupal_set_message(t('Could not determine a valid tag style for GeSHi filtering.'), 'error');
+      drupal_set_message($this->t('Could not determine a valid tag style for GeSHi filtering.'), 'error');
       $bracket_open = SafeMarkup::checkPlain('<');
       $bracket_close = SafeMarkup::checkPlain('>');
     }
@@ -221,32 +221,32 @@ class GeshiFilterFilter extends FilterBase {
       $lang_attributes = GeshiFilter::whitespaceExplode(GeshiFilter::ATTRIBUTES_LANGUAGE);
 
       // Syntax highlighting tags.
-      $output = '<p>' . t('Syntax highlighting of source code can be enabled with the following tags:') . '</p>';
+      $output = '<p>' . $this->t('Syntax highlighting of source code can be enabled with the following tags:') . '</p>';
       $items = array();
       // Seneric tags.
       $tags = array();
       foreach ($generic_code_tags as $tag) {
         $tags[] = $bracket_open . $tag . $bracket_close;
       }
-      $items[] = t('Generic syntax highlighting tags: <code>@tags</code>.', array('@tags' => Markup::create(implode(', ', $tags))));
+      $items[] = $this->t('Generic syntax highlighting tags: <code>@tags</code>.', array('@tags' => Markup::create(implode(', ', $tags))));
       // Language tags.
       $tags = array();
       foreach ($language_tags as $tag) {
-        $tags[] = t('<code>@tag</code> for @lang source code', array(
+        $tags[] = $this->t('<code>@tag</code> for @lang source code', array(
           '@tag' => Markup::create($bracket_open . $tag . $bracket_close),
           '@lang' => $languages[$tag_to_lang[$tag]],
         ));
       }
-      $items[] = '<li>' . t('Language specific syntax highlighting tags:') . implode(', ', $tags) . '</li>';
+      $items[] = '<li>' . $this->t('Language specific syntax highlighting tags:') . implode(', ', $tags) . '</li>';
       // PHP specific delimiters.
       if (in_array(GeshiFilter::BRACKETS_PHPBLOCK, $tag_styles)) {
-        $items[] = t('PHP source code can also be enclosed in &lt;?php ... ?&gt; or &lt;% ... %&gt;, but additional options like line numbering are not possible here.');
+        $items[] = $this->t('PHP source code can also be enclosed in &lt;?php ... ?&gt; or &lt;% ... %&gt;, but additional options like line numbering are not possible here.');
       }
 
       $output .= '<ul>' . implode('', $items) . '</ul>';
 
       // Options and tips.
-      $output .= '<p>' . t('Options and tips:') . '</p>';
+      $output .= '<p>' . $this->t('Options and tips:') . '</p>';
       $items = array();
 
       // Info about language attribute to language mapping.
@@ -260,9 +260,9 @@ class GeshiFilterFilter extends FilterBase {
       ksort($att_to_full);
       $att_for_full = array();
       foreach ($att_to_full as $att => $fullname) {
-        $att_for_full[] = t('"<code>@langcode</code>" (for @fullname)', array('@langcode' => $att, '@fullname' => $fullname));
+        $att_for_full[] = $this->t('"<code>@langcode</code>" (for @fullname)', array('@langcode' => $att, '@fullname' => $fullname));
       }
-      $items[] = t('The language for the generic syntax highlighting tags can be
+      $items[] = $this->t('The language for the generic syntax highlighting tags can be
         specified with one of the attribute(s): %attributes. The possible values
         are: @languages.', array(
           '%attributes' => implode(', ', $lang_attributes),
@@ -272,11 +272,11 @@ class GeshiFilterFilter extends FilterBase {
 
       // Tag style options.
       if (count($tag_style_examples) > 1) {
-        $items[] = t('The supported tag styles are: @tag_styles.', array('@tag_styles' => Markup::create(implode(', ', $tag_style_examples))));
+        $items[] = $this->t('The supported tag styles are: @tag_styles.', array('@tag_styles' => Markup::create(implode(', ', $tag_style_examples))));
       }
 
       // Line numbering options.
-      $items[] = t('<em>Line numbering</em> can be enabled/disabled with the
+      $items[] = $this->t('<em>Line numbering</em> can be enabled/disabled with the
         attribute "%linenumbers". Possible values are: "%off" for no line
         numbers, "%normal" for normal line numbers and "%fancy" for fancy line
         numbers (every n<sup>th</sup> line number highlighted). The start line
@@ -294,12 +294,12 @@ class GeshiFilterFilter extends FilterBase {
       );
 
       // Block versus inline.
-      $items[] = t('If the source code between the tags contains a newline (e.g.
+      $items[] = $this->t('If the source code between the tags contains a newline (e.g.
         immediatly after the opening tag), the highlighted source code will be
         displayed as a code block. Otherwise it will be displayed inline.');
 
       // Code block title.
-      $items[] = t('A title can be added to a code block with the attribute "%title".', array(
+      $items[] = $this->t('A title can be added to a code block with the attribute "%title".', array(
         '%title' => GeshiFilter::ATTRIBUTE_TITLE,
       ));
 
@@ -311,42 +311,42 @@ class GeshiFilterFilter extends FilterBase {
       $output .= render($render);
 
       // Defaults.
-      $output .= '<p>' . t('Defaults:') . '</p>';
+      $output .= '<p>' . $this->t('Defaults:') . '</p>';
       $items = array();
       $default_highlighting = $this->config->get('default_highlighting');
       switch ($default_highlighting) {
         case GeshiFilter::DEFAULT_DONOTHING:
-          $description = t("when no language attribute is specified the code
+          $description = $this->t("when no language attribute is specified the code
             block won't be processed by the GeSHi filter");
           break;
 
         case GeshiFilter::DEFAULT_PLAINTEXT:
-          $description = t('when no language attribute is specified, no syntax
+          $description = $this->t('when no language attribute is specified, no syntax
            highlighting will be done');
           break;
 
         default:
-          $description = t('the default language used for syntax highlighting is
+          $description = $this->t('the default language used for syntax highlighting is
             "%default_lang"', array('%default_lang' => $default_highlighting));
           break;
       }
-      $items[] = t('Default highlighting mode for generic syntax highlighting
+      $items[] = $this->t('Default highlighting mode for generic syntax highlighting
         tags: @description.', array('@description' => $description));
       $default_line_numbering = $this->config->get('default_line_numbering');
       switch ($default_line_numbering) {
         case GeshiFilter::LINE_NUMBERS_DEFAULT_NONE:
-          $description = t('no line numbers');
+          $description = $this->t('no line numbers');
           break;
 
         case GeshiFilter::LINE_NUMBERS_DEFAULT_NORMAL:
-          $description = t('normal line numbers');
+          $description = $this->t('normal line numbers');
           break;
 
         default:
-          $description = t('fancy line numbers (every @n lines)', array('@n' => $default_line_numbering));
+          $description = $this->t('fancy line numbers (every @n lines)', array('@n' => $default_line_numbering));
           break;
       }
-      $items[] = t('Default line numbering: @description.', array('@description' => $description));
+      $items[] = $this->t('Default line numbering: @description.', array('@description' => $description));
       $render = array(
         '#theme' => 'item_list',
         '#items' => $items,
@@ -364,13 +364,13 @@ class GeshiFilterFilter extends FilterBase {
       foreach ($language_tags as $tag) {
         $tags[] = '<code>' . $bracket_open . SafeMarkup::checkPlain($tag) . $bracket_close . '</code>';
       }
-      $output = t('You can enable syntax highlighting of source code with the following tags: @tags.', array('@tags' => Markup::create(implode(', ', $tags))));
+      $output = $this->t('You can enable syntax highlighting of source code with the following tags: @tags.', array('@tags' => Markup::create(implode(', ', $tags))));
       // Tag style options.
       if (count($tag_style_examples) > 1) {
-        $output .= ' ' . t('The supported tag styles are: @tag_styles.', array('@tag_styles' => Markup::create(implode(', ', $tag_style_examples))));
+        $output .= ' ' . $this->t('The supported tag styles are: @tag_styles.', array('@tag_styles' => Markup::create(implode(', ', $tag_style_examples))));
       }
       if (in_array(GeshiFilter::BRACKETS_PHPBLOCK, $tag_styles)) {
-        $output .= ' ' . t('PHP source code can also be enclosed in &lt;?php ... ?&gt; or &lt;% ... %&gt;.');
+        $output .= ' ' . $this->t('PHP source code can also be enclosed in &lt;?php ... ?&gt; or &lt;% ... %&gt;.');
       }
     }
     return $output;
@@ -398,7 +398,7 @@ class GeshiFilterFilter extends FilterBase {
       // Per language tags.
       $form['per_language_settings'] = array(
         '#type' => 'fieldset',
-        '#title' => t('Per language tags'),
+        '#title' => $this->t('Per language tags'),
         '#collapsible' => TRUE,
         'table' => $this->perLanguageSettings('enabled', FALSE, TRUE),
       );
@@ -407,7 +407,7 @@ class GeshiFilterFilter extends FilterBase {
     }
     else {
       $form['info'] = array(
-        '#markup' => '<p>' . t('GeSHi filter is configured to use global tag
+        '#markup' => '<p>' . $this->t('GeSHi filter is configured to use global tag
           settings. For separate settings per text format, enable this option in
           the <a href=":geshi_admin_url">general GeSHi filter settings</a>.', array(
             ':geshi_admin_url' => Url::fromRoute('geshifilter.settings')->toString(),
@@ -520,32 +520,32 @@ class GeshiFilterFilter extends FilterBase {
     // Generic tags.
     $form["tags"] = array(
       '#type' => 'textfield',
-      '#title' => t('Generic syntax highlighting tags'),
+      '#title' => $this->t('Generic syntax highlighting tags'),
       '#default_value' => $this->tags(),
-      '#description' => t('Tags that should activate the GeSHi syntax highlighting. Specify a space-separated list of tagnames.'),
+      '#description' => $this->t('Tags that should activate the GeSHi syntax highlighting. Specify a space-separated list of tagnames.'),
     );
     // Container tag styles.
     $form["tag_styles"] = array(
       '#type' => 'checkboxes',
-      '#title' => t('Container tag style'),
+      '#title' => $this->t('Container tag style'),
       '#options' => array(
         GeshiFilter::BRACKETS_ANGLE => '<code>' . htmlentities('<foo> ... </foo>') . '</code>',
         GeshiFilter::BRACKETS_SQUARE => '<code>' . htmlentities('[foo] ... [/foo]') . '</code>',
         GeshiFilter::BRACKETS_DOUBLESQUARE => '<code>' . htmlentities('[[foo]] ... [[/foo]]') . '</code>',
-        GeshiFilter::BRACKETS_PHPBLOCK => t('PHP style source code blocks: <code>@php</code> and <code>@percent</code>', array(
+        GeshiFilter::BRACKETS_PHPBLOCK => $this->t('PHP style source code blocks: <code>@php</code> and <code>@percent</code>', array(
           '@php' => '<?php ... ?>',
           '@percent' => '<% ... %>',
         )),
       ),
       '#default_value' => $this->tagStyles(),
-      '#description' => t('Select the container tag styles that should trigger GeSHi syntax highlighting.'),
+      '#description' => $this->t('Select the container tag styles that should trigger GeSHi syntax highlighting.'),
     );
     // Decode entities.
     $form["decode_entities"] = array(
       '#type' => 'checkbox',
-      '#title' => t('Decode entities'),
+      '#title' => $this->t('Decode entities'),
       '#default_value' => $this->settings['general_tags']['decode_entities'],
-      '#description' => t('Decode entities, for example, if the code has been typed in a WYSIWYG editor.'),
+      '#description' => $this->t('Decode entities, for example, if the code has been typed in a WYSIWYG editor.'),
     );
     return $form;
   }
@@ -569,16 +569,16 @@ class GeshiFilterFilter extends FilterBase {
   protected function perLanguageSettings($view, $add_checkbox, $add_tag_option) {
     $form = array();
     $header = array(
-      t('Language'),
-      t('GeSHi language code'),
+      $this->t('Language'),
+      $this->t('GeSHi language code'),
     );
     if ($add_tag_option) {
-      $header[] = t('Tag/language attribute value');
+      $header[] = $this->t('Tag/language attribute value');
     }
     $form['language'] = array(
       '#type' => 'table',
       '#header' => $header,
-      '#empty' => t('Nome language is available.'),
+      '#empty' => $this->t('Nome language is available.'),
     );
 
     // Table body.
