System Information
- Strapi Version: 5.0.0-rc.6
- Operating System: macOS Ventura
- Database: sqlite
- Node Version: v18.18.2
- NPM Version: 9.8.1
- Yarn Version: -
Strapi V5 dropped localizations field:
It is a critical feature in our websites - based on localizations field we have implemented language switcher:
- I fetch the blog post for the given slug and the given language including localizations
- from the response I can see what other localizations exist for my fetched blog posts and thus I can create a language switcher that will navigate me from one locale, to the other, for example:
/en/blog/first-blog-post → /de/blog/erster-blogbeitrag
Without localization field THIS IS NOT POSSIBLE.
The above mentioned docs talk about “Manual procedure” and getAvailableLocales
function. So am I supposed to create custom endpoint that would implement this function, just to get localizations for given document? This function needs document ID, so I would need to make 2 requests (first fetch blog post based on slug - to get document ID, and then fetch it’s localizations).
This seems quite complicated, considering that it used to be a built-in feature.
Will be grateful for any help.