We're building a CMS that lets you post in multiple languages

Vlad Balan
1 min read
We're building a CMS that lets you post in multiple languages

We started implementing i18n (that's internationalization if you're not fond of numeronyms) on many of our projects. Pretty soon we ran into a dilemma:

What if I have a blog on my multilingual website? How do I handle this?

Since we created a custom headless CMS for all our blogging needs, the obvious answer was to customize it even further. For each project we can now define a default language and a list of secondary languages. Now whenever we create an article, we can translate the title, the text (preserving the markdown!) and the slug, of course.

All we need to do is include a language parameter when calling the CMS endpoint and it will return the correct version.

https://cms.spacemagic.dev/posts?key=your-blogs-public-key&lang=ro

It works really well! In fact, chances are you are reading the translated version of this very article. Check the footer for the language switch 😉. How cool is that?

If you found this article useful, please hit the little heart shaped like button or share it with your network! (Yes, it's a CMS with like and share functionality)