Skip to content

How can I add more languages to the website? #214

Answered by mearashadowfax
Najib90 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @Najib90! You have a few options:

Content Collections: You can continue using Content Collections to store localized content for different languages and query them as needed. For example, create or adjust the Hero component by setting up a collection directory called hero. Then, add JSON files for each language, such as heroEN.json, heroFR.json, and for the new languages, heroDE.json and heroNL.json.

CMS Integration: Another option is to use a CMS to manage your content, which follows similar logic to Astro's native Content Collections. The content will be stored centrally and queried based on the active language.

i18n Library for Shared Components: While Content Collections are great…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Najib90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants