How can I deploy user interface translation?
Helper function to add custom translations:

/**
 * Helper to manually add a single translation string.
 *
 * @param string $source_string
 *   Source string.
 * @param string $langcode
 *   The langcode.
 * @param string $translated_string
 *   Translated string.
 */
function MYMODULE_add_translation($source_string, $langcode, $translated_string) {
  // Find existing source string.
  $storage = \Drupal::service('locale.storage');
  $string = $storage-&gt;findString(['source' =&gt; $source_string]);
  if (is_null($string)) {
    $string = new SourceString();
    $string-&gt;setString($source_string);
    $string-&gt;setStorage($storage);
    $string-&gt;save();
  }
  // Create translation. If one already exists, it will be replaced.
  $translation = $storage-&gt;createTranslation([
    'lid' =&gt; $string-&gt;lid,
    'language' =&gt; $langcode,
    'translation' =&gt; $translated_string,
  ]);
  $translation-&gt;save();
}


Usage in an update hook:

/**
 * Add translations.
 */
function MYMODULE_update_8002() {
  MYMODULE_add_translation('Adjust', 'de', 'Anpassen');
}