Blog Internationalization with Strapi

Hey folks, I was looking around the web and could not find any appropriate solution about the internationalisation problems we are facing with Strapi, so though of asking here.

We have a blog with 70+ posts, and we are starting to work on internationalisation with Deepl, and host the translated content inside Strapi.

The problems we are facing currently:

  1. Slug conflicts

When we add a new locale for a specific post, we need to explicitly change the slug by hand to something new. What would be the easiest way to avoid this? Can we avoid the uniqueness of the slug? Or have a custom resolver for the slug, to add the locale when we add a new translation?

  1. Automate the translation

Is there any way to automate this process? Currently we have 70+ posts, and for 5 locales this would be too much work. Also we would love this process to work for new posts, adding the original English post by hand and then have this process augmenting this post to the extra locale we added in the i18n settings.

Looking forwards for your thoughts.


System Information
  • Strapi Version: 4.6.1
  • Operating System:
  • Database: PostgreSQL

1 Like

You can certainly automate the content population here, just add authentication to your PUT or POST endpoints for your blog posts, and write a script that takes your data and submits it to Strapi.

You could also do this via a custom plugin to handle blog importing, inside the plugin you could even handle the UID change for slug.

Hope that helps!

Thanks @webbist for the prompt reply. Is there any good cookbook we could follow?

Or any good examples to make this programmatically?