Migrate Site to German as Default Locale

This commit is contained in:
2024-03-09 13:53:43 +01:00
parent fd56de0451
commit 9312089e96
26 changed files with 109 additions and 486 deletions

View File

@ -1,7 +1,7 @@
import type { AstroIntegration } from "astro";
import { mkdir, access, constants, copyFile, rename } from "node:fs/promises";
const locales = ["de"];
const locales = ["en"];
export default function configureI18n(): AstroIntegration {
return {
@ -24,11 +24,11 @@ export default function configureI18n(): AstroIntegration {
logger.info(`Copied ${oldPath}index.html to ${newPath}index.html.${locale}`);
} else {
const oldPath = cutPrefix(`${dir.pathname}${page.pathname}`);
await rename(`${oldPath}index.html`, `${oldPath}index.html.en`);
await rename(`${oldPath}index.html`, `${oldPath}index.html.de`);
}
}
}
}
},
},
};
}