is it possible to automatically add something like “mysite.com/api/entity?locale=lowercase($current_language_code)” ?
Can you tell me also what should I configure into my REST API calls for this local parameter as I don’t know how I can get the current active local in the divhunt page (should be lowercased)
@dejan The toLowerCase could be not necessary is in the language config we could specify a lowcase value or have a lowercase (standard) value at hand in the variables.
I’ve started my Strapi server for you to do tests if necessary.
What are the urls to change languages ? Is there a dedicated component to be able to switch languages wherever we are and targeting the page we are currently displaying ?
To clarify : in Strapi, you can have entries associated with language. Ex. Articles, some are in french, some in english and some with versions for both languages.
Thus, when the “locale=en” parameter is used, only entries with an english version is returned.
In your request, you’ve set Divhunt system language to be passed to Strapi, so it’s automatic.
If you want manually to have property inside builder and choose language, then you need inside request to create new Dynamic Property called “locale” and then you’ll be able to manually pass locale.
As for Strapi plugin, I’ll add that soon - or should we also do automatic?
To me it makes sense to be automatic.
However, I’ve not an extensive view of Strapi use cases: is it possible to have a configuration in the plugin where you say "automatically add the locale parameter ?