diff --git a/core/modules/translation/translation.module b/core/modules/translation/translation.module
index 5fbdf01..51987d3 100644
--- a/core/modules/translation/translation.module
+++ b/core/modules/translation/translation.module
@@ -528,7 +528,7 @@ function translation_language_switch_links_alter(array &$links, $type, $path) {
       else {
         // No translation in this language, or no permission to view.
         unset($links[$langcode]['href']);
-        $links[$langcode]['attributes']['class'] = 'locale-untranslated';
+        $links[$langcode]['attributes']['class'][] = 'locale-untranslated';
       }
     }
   }
diff --git a/core/modules/translation/translation.test b/core/modules/translation/translation.test
index f1457a8..8747797 100644
--- a/core/modules/translation/translation.test
+++ b/core/modules/translation/translation.test
@@ -437,7 +437,7 @@ class TranslationTestCase extends DrupalWebTestCase {
         $xpath = '//div[contains(@class, :type)]//a[@href=:url]';
       }
       else {
-        $xpath = '//div[contains(@class, :type)]//span[@class="locale-untranslated"]';
+        $xpath = '//div[contains(@class, :type)]//span[contains(@class, "locale-untranslated")]';
       }
 
       $found = $this->findContentByXPath($xpath, array(':type' => $type, ':url' => $url), $translation_language->name);
