transliteration – how to get translation of taxonomy term in a preprocess function

I am using MYTHEME_preprocess_views_view to assign the taxonomy term as the page title for all the entries of a content type. it’s working fine but the issue is when I switch the language from English to Arabic the page content is translating correctly but the title still remains in English. While I have translated all the taxonomy terms. Here is my code.

/* Preprocess Function to print the taxonomy term as title for media_center bundle */
function kmtheme_preprocess_page_title(&$variables) {
  $node = Drupal::request()->attributes->get('node');
  if ($node && $node->hasField('field_media_center') && !$node->field_media_center->isEmpty()) {

  if ($node && $node->bundle() == 'media_center') {
    $term = DrupaltaxonomyEntityTerm::load($node->get('field_media_center')->target_id);
    $term_name = $term->getName();

    $variables('title') = t($term_name);

I want to get the translated value of the taxonomy term when the language switch from English to Arabic.