Qwik Speak and Adapters
If you use Qwik-provided adapters for publishing your app, especially with edge functions or static generation, it is recommended to bundle the translation files (see Translation functions)
If your production environment doesn't support dynamic import, you can import files directly:
Static Site Generation (SSG)
If you want to use Static Site Generation, you need to generate for each supported language an index.html
of each page you will include in SSG.
Get the code ready
Bundle the translation files (see Translation functions) or provide a running server during the build if you are fetching the files
Configure a localized router with a
lang
parameterHandle the dynamic
lang
parameter, adding the values it can take to each page included in SSG, e.g.:
src/routes/[...lang]/index.tsx
See Dynamic SSG routes in official Qwik docs for more details
Building
Inspect the dist
folder: you should have for each language an index.html
of each page you have included in SSG.
Last updated