UNPKG

@lucidcms/core

Version:

The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.

2 lines 567 B
import{resolveInterfaceLocale as e}from"../../libs/i18n/translate.mjs";const t=async(t,n)=>{let r=t.config.i18n.defaultLocale,i=n.locale?e({config:t.config,locale:n.locale}):t.request.locale,a=t.config.i18n.locales.map(e=>({code:e.code,label:e.label,direction:e.direction??`ltr`,isDefault:e.code===r}));return{error:void 0,data:{locale:i,defaultLocale:r,direction:(a.find(e=>e.code===i)??a.find(e=>e.code===r))?.direction??`ltr`,locales:a,translations:t.translate.forLocale(i).adminBundle()}}};export{t as default}; //# sourceMappingURL=get-admin-translations.mjs.map