We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2f389a commit 7adcc43Copy full SHA for 7adcc43
assets/js/bpd.js
@@ -20,7 +20,8 @@ if (menuToggle) {
20
function loadLanguage(lang) {
21
let base_pathname = window.location.pathname;
22
// ISO 639-1 language codes are two-letter codes
23
- let lang_path_regex = /^\/[a-z]{2}([_-][a-z]+)?\//;
+ // ISO 3166-1 alpha-2 country codes are two-letter codes
24
+ let lang_path_regex = /^\/[a-z]{2}([_-][A-Z]{2})?\//;
25
26
// Check if the URL path is more than just /path/ and starts with a language code
27
let path_parts = base_pathname.split("/");
0 commit comments