DEV Community

Huy Nguyen
Huy Nguyen

Posted on

Easy Multilingual Page (Scales to Over 50 Languages)

Hi all,

So, a few months back, I kicked off a project to create a multilingual website. Let me tell you, managing content in multiple languages is a real headache. It’s doable if you’re only dealing with 3 or 4 languages, but once you hit 30+, it’s a whole different ball game trying to keep everything updated and consistent.

To make life easier, I decided to bring in a CMS for my Astro-based site. I dug into frameworks like Wagtail and Strapi since I’m familiar with Python and Node.js, but man, those were tough nuts to crack. Plus, I wanted a centralized place for all my content instead of having to jump between different pages for each language. This way, I can easily compare content across languages without getting lost.

And here's the kicker: ChatGPT is shaping up to be a solid translator, but no one’s integrated it into any frameworks yet. So, with my Django and Astrowind know-how (Astrowind is this cool UI built on Astro and Tailwind, and it’s open source), I whipped up a small Django library/framework to act as a headless CMS. I also tweaked the Astrowind source to pull in content from the CMS with multilingual support.

Check out this demo if you wanna see it in action:
https://django-astrowind.netlify.app/en

Not much has changed from the original Astrowind (https://astrowind.vercel.app/), except now you can switch languages on the fly, and the content is managed through a CMS with hashed caching.

If you’re interested in using it, I’ve put together a tutorial to help you set it up on your own machine:
https://django-headless-cms.readthedocs.io/en/latest/quick-start.html

Hope you dig it. And I hope my little project can be of some help to you guys.

Top comments (0)