aboutsummaryrefslogtreecommitdiff
path: root/asset-sources
diff options
context:
space:
mode:
Diffstat (limited to 'asset-sources')
-rw-r--r--asset-sources/fietsboek.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/asset-sources/fietsboek.ts b/asset-sources/fietsboek.ts
index d70890f..66caa4f 100644
--- a/asset-sources/fietsboek.ts
+++ b/asset-sources/fietsboek.ts
@@ -75,8 +75,9 @@ function addHandler<K extends keyof GlobalEventHandlersEventMap>(
* @param event - The triggering event.
*/
function languageClicked(event: MouseEvent) {
+ const path = new URL(BASE_URL).pathname;
const language = (event.target as HTMLElement).getAttribute("data-langcode");
- document.cookie = "fietsboek_locale=" + language;
+ document.cookie = `fietsboek_locale=${language}; Path=${path}`;
window.location.reload();
event.preventDefault();
}