Hi is there a endpoint to get all the languages (locales) configured?
No endpoint?
I am not sure, but you could always create a custom endpoint, read it from the config, and return it in the response
you mean all locales of a specific doc?
or do you mean just to fetch the actual available locales on your config?
The actual available locales on my config
endpoints: [
{
path: '/api/locales',
method: 'get',
handler: (req, res) => {
const { config } = req.payload;
const locales = config.localization ? config.localization.locales : [];
return res.json(locales);
},
root: true,
},
],
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.