Open dBianchii opened 3 months ago
Just an example from my own project:
If I don't have locale accessible inside the api, this will mean I won't have access to the user's selected language in there, yes? I'm not sure if this will be a problem
I guess you should add the locale in headers/parameters of your API endpoint, then?
I don't believe it's necessary to place your API routes inside the [locale] folder.
You can access the locale via the NEXT_LOCALE
cookie or the Accept-Language
header an if that won't do you can also access the locale by formatting the URL gotten from the Referer
header.
I am using this library, and I managed to get this to work when my api folder is not inside the [locale] folder. Is this the correct way to do it?
If I don't have locale accessible inside the api, this will mean I won't have access to the user's selected language in there, yes? I'm not sure if this will be a problem