Website/astro-i18n.config.ts

21 Zeilen
809 B
TypeScript

2023-10-12 21:02:57 +02:00
import { defineAstroI18nConfig } from "astro-i18n"
export default defineAstroI18nConfig({
primaryLocale: "en", // default app locale
secondaryLocales: ["de"], // other supported locales
fallbackLocale: "en", // fallback locale (on missing translation)
trailingSlash: "never", // "never" or "always"
2023-11-03 20:31:27 +01:00
run: "client+server", //"client+server" or "server"
2023-10-12 21:02:57 +02:00
showPrimaryLocale: false, // "/en/about" vs "/about"
translationLoadingRules: [], // per page group loading
2023-11-03 20:31:27 +01:00
translationDirectory: {}, // translation directory names
2023-10-12 21:02:57 +02:00
translations: {}, // { [translation_group1]: { [locale1]: {}, ... } }
routes: {
de: {
about: "ueber-uns",
2023-11-03 20:31:27 +01:00
join: "jetzt-spielen",
imprint: "impressum",
"code-of-conduct": "verhaltensrichtlinien",
2023-10-12 21:02:57 +02:00
}
}, // { [secondary_locale1]: { about: "about-translated", ... } }
})