Migrate Site to German as Default Locale
This commit is contained in:
@ -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`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user