Accessing translation and language URL from hook_preprocess_menu()
I found the answer myself.

if($variables['menu_name'] == 'navigation') {     
  $langcode = \Drupal::languageManager()-&gt;getCurrentLanguage()-&gt;getName();
  // Add the logic here.
}