How to get the current path, keeping the langcode? For my button I need to specify the destination path, as my site is multilingual it is imporatnt for me to keep the langcode in the path. So how can I get from 

 drupal-site/fr/page_1 


to

 drupal-site/fr/page-2 ? 


By just appending /page-2 I lose my language settings.
You can try code:

$langcode ='en';
$node_url = $node-&gt;getTranslation($langcode)-&gt;toUrl('canonical', ['absolute' =&gt; TRUE])-&gt;toString();