diff --git a/core/lib/Drupal/Core/Block/BlockBase.php b/core/lib/Drupal/Core/Block/BlockBase.php
index 37d5b93..388b9bd 100644
--- a/core/lib/Drupal/Core/Block/BlockBase.php
+++ b/core/lib/Drupal/Core/Block/BlockBase.php
@@ -18,9 +18,10 @@
 use Drupal\Core\Plugin\ContextAwarePluginBase;
 use Drupal\Component\Utility\Unicode;
 use Drupal\Component\Utility\NestedArray;
-use Drupal\Core\Language\LanguageInterface;
+use Drupal\Core\Language\Language;
 use Drupal\Core\Cache\Cache;
 use Drupal\Core\Session\AccountInterface;
+use Drupal\Component\Transliteration\TransliterationInterface;
 
 /**
  * Defines a base block implementation that most blocks plugins will extend.
@@ -50,6 +51,13 @@
   protected $conditionPluginManager;
 
   /**
+   * The transliteration service.
+   *
+   * @var \Drupal\Component\Transliteration\TransliterationInterface
+   */
+  protected $transliteration;
+
+  /**
    * {@inheritdoc}
    */
   public function label() {
@@ -407,8 +415,7 @@ public function getMachineNameSuggestion() {
     // @todo This is basically the same as what is done in
     //   \Drupal\system\MachineNameController::transliterate(), so it might make
     //   sense to provide a common service for the two.
-    $transliteration_service = \Drupal::transliteration();
-    $transliterated = $transliteration_service->transliterate($admin_label, LanguageInterface::LANGCODE_DEFAULT, '_');
+    $transliterated = $this->transliteration()->transliterate($admin_label, Language::LANGCODE_DEFAULT, '_');
 
     $replace_pattern = '[^a-z0-9_.]+';
 
@@ -422,6 +429,28 @@ public function getMachineNameSuggestion() {
   }
 
   /**
+   * Wraps the transliteration service.
+   *
+   * @return \Drupal\Component\Transliteration\TransliterationInterface
+   */
+  protected function transliteration() {
+    if (!$this->transliteration) {
+      $this->transliteration = \Drupal::transliteration();
+    }
+    return $this->transliteration;
+  }
+
+  /**
+   * Sets the transliteration service.
+   *
+   * @param \Drupal\Component\Transliteration\TransliterationInterface $transliteration
+   *   The transliteration service.
+   */
+  public function setTransliteration(TransliterationInterface $transliteration) {
+    $this->transliteration = $transliteration;
+  }
+
+  /**
    * Returns the cache contexts required for this block.
    *
    * @return array
@@ -532,5 +561,4 @@ protected function eventDispatcher() {
   protected function contextHandler() {
     return \Drupal::service('context.handler');
   }
-
 }
diff --git a/core/tests/Drupal/Tests/Core/Block/BlockBaseTest.php b/core/tests/Drupal/Tests/Core/Block/BlockBaseTest.php
index 13320ed..77656bd 100644
--- a/core/tests/Drupal/Tests/Core/Block/BlockBaseTest.php
+++ b/core/tests/Drupal/Tests/Core/Block/BlockBaseTest.php
@@ -34,7 +34,6 @@ public function testGetMachineNameSuggestion() {
       ->will($this->returnValue(array()));
     $container = new ContainerBuilder();
     $container->set('plugin.manager.condition', $condition_plugin_manager);
-    $container->set('transliteration', $transliteraton);
     \Drupal::setContainer($container);
 
     $config = array();
@@ -43,6 +42,7 @@ public function testGetMachineNameSuggestion() {
       'provider' => 'block_test',
     );
     $block_base = new TestBlockInstantiation($config, 'test_block_instantiation', $definition);
+    $block_base->setTransliteration($transliteraton);
     $this->assertEquals('adminlabel', $block_base->getMachineNameSuggestion());
 
     // Test with more unicodes.
@@ -51,6 +51,7 @@ public function testGetMachineNameSuggestion() {
       'provider' => 'block_test',
     );
     $block_base = new TestBlockInstantiation($config, 'test_block_instantiation', $definition);
+    $block_base->setTransliteration($transliteraton);
     $this->assertEquals('uberawesome', $block_base->getMachineNameSuggestion());
   }
 
