docs progress

This commit is contained in:
vcoppe
2024-07-09 17:49:18 +02:00
parent d46cb4c2e5
commit 7264445926
40 changed files with 470 additions and 68 deletions

View File

@@ -7,6 +7,7 @@ import { map } from "./stores";
import { base } from "$app/paths";
import { browser } from "$app/environment";
import { languages } from "$lib/languages";
import { locale } from "svelte-i18n";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
@@ -101,6 +102,13 @@ export function getURLForLanguage(lang: string | null | undefined, path?: string
languageInPath = 'en';
}
if (lang === null || lang === undefined) {
lang = get(locale);
if (lang === null || lang === undefined) {
lang = 'en';
}
}
if (languageInPath === 'en') {
if (lang === 'en') {
return `${base}${newPath}`;