diff --git a/src/Form/TranslatorForm.php b/src/Form/TranslatorForm.php
index ad82e3d..1243c6d 100644
--- a/src/Form/TranslatorForm.php
+++ b/src/Form/TranslatorForm.php
@@ -127,6 +127,7 @@ class TranslatorForm extends EntityForm {
       $form['plugin_wrapper']['plugin'] = array(
         '#type' => 'select',
         '#title' => t('Translator plugin'),
+        '#limit_validation_errors' => array(array('plugin')),
         '#description' => isset($definition['description']) ? Xss::filter($definition['description']) : '',
         '#options' => $available,
         '#default_value' => $entity->getPluginID(),
@@ -158,7 +159,7 @@ class TranslatorForm extends EntityForm {
     // If current translator is configured to provide remote language mapping
     // provide the form to configure mappings, unless it does not exists yet.
     if (!empty($controller) && $entity->providesRemoteLanguageMappings()) {
-      $form['remote_languages_mappings'] = array(
+      $form['plugin_wrapper']['remote_languages_mappings'] = array(
         '#tree' => TRUE,
         '#type' => 'details',
         '#title' => t('Remote languages mappings'),
@@ -172,7 +173,7 @@ class TranslatorForm extends EntityForm {
       }
 
       foreach ($entity->getRemoteLanguagesMappings() as $local_language => $remote_language) {
-        $form['remote_languages_mappings'][$local_language] = array(
+        $form['plugin_wrapper']['remote_languages_mappings'][$local_language] = array(
           '#type' => 'textfield',
           '#title' => \Drupal::languageManager()->getLanguage($local_language)->getName() . ' (' . $local_language . ')',
           '#default_value' => $remote_language,
@@ -180,10 +181,11 @@ class TranslatorForm extends EntityForm {
         );
 
         if (!empty($options)) {
-          $form['remote_languages_mappings'][$local_language]['#type'] = 'select';
-          $form['remote_languages_mappings'][$local_language]['#options'] = $options;
-          $form['remote_languages_mappings'][$local_language]['#empty_option'] = ' - ';
-          unset($form['remote_languages_mappings'][$local_language]['#size']);
+          $form['plugin_wrapper']['remote_languages_mappings'][$local_language]['#type'] = 'select';
+          $form['plugin_wrapper']['remote_languages_mappings'][$local_language]['#options'] = $options;
+          $form['plugin_wrapper']['remote_languages_mappings'][$local_language]['#empty_option'] = ' - ';
+          $form['plugin_wrapper']['remote_languages_mappings'][$local_language]['#default_value'] = $options[$entity->mapToRemoteLanguage($remote_language)];
+          unset($form['plugin_wrapper']['remote_languages_mappings'][$local_language]['#size']);
         }
       }
     }
diff --git a/src/TranslatorPluginUiBase.php b/src/TranslatorPluginUiBase.php
index 13f5d11..2dd6359 100644
--- a/src/TranslatorPluginUiBase.php
+++ b/src/TranslatorPluginUiBase.php
@@ -93,6 +93,45 @@ class TranslatorPluginUiBase extends ComponentPluginBase implements TranslatorPl
   }
 
   /**
+   * Ajax callback to fetch the options provided by a translator.
+   */
+  public function ajaxUpdateSettings(array $form, FormStateInterface $form_state) {
+    return $form['plugin_wrapper'];
+  }
+
+  /**
+   * Handles submit call to test credentials.
+   */
+  public function submitTestCredentials(array $form, FormStateInterface $form_state) {
+    // When this method is called the form already passed validation and we can
+    // assume that credentials are valid.
+    drupal_set_message('Valid credentials');
+    $form_state->setRebuild();
+  }
+
+  /**
+   * Adds a test credentials button to a form.
+   *
+   * @return array
+   *   A form array containing test credentials button.
+   */
+  public function addTestCredentialsButton() {
+    $form['test_credentials'] = array(
+      '#type' => 'submit',
+      '#value' => t('Test credentials'),
+      '#submit' => array(array($this, 'submitTestCredentials')),
+      '#limit_validation_errors' => array(array('settings')),
+      '#executes_submit_callback' => TRUE,
+      '#ajax' => array(
+        'callback' => array($this, 'ajaxUpdateSettings'),
+        'wrapper' => 'tmgmt-plugin-wrapper',
+      ),
+    );
+
+    return $form;
+  }
+
+  /**
    * {@inheritdoc}
    */
   public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
