How do I get the path alias without the language code?
Since you just need the last part of the path, you can use the following code in a hook_preprocess_html() implementation.

$current_path = \Drupal::service('path.current')-&gt;getPath();
$alias = \Drupal::service('path.alias_manager')-&gt;getAliasByPath($current_path);
if (basename($alias) == 'the-new-webpage.html') {
  // Your code here
}