How do I detect the language using node alias
To get the path alias of specific language try with:

$current_lang = \Drupal::languageManager()-&gt;getCurrentLanguage()-&gt;getId();
/** @var \Drupal\Core\Path\AliasManager $aliasManager */
$aliasManager =  \Drupal::service('path.alias_manager');
$alias = $aliasManager-&gt;getAliasByPath('/node/10', $current_lang);


If you want to get the language code from alias try with:

$aliasArray = \Drupal::service('path.alias_storage')-&gt;load(['source' =&gt; '/node/' . $nid]);
$lang_code = $aliasArray['langcode'];