add dist
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Transforms validated i18n config into Payload's localization object.
|
||||
* Pure function — no side effects, no validation (caller validates first).
|
||||
*/ export function buildLocalizationConfig(config) {
|
||||
const { defaultLocale, fallback = true, locales } = config;
|
||||
return {
|
||||
defaultLocale,
|
||||
fallback,
|
||||
locales: locales.map((locale)=>({
|
||||
code: locale.code,
|
||||
label: locale.label,
|
||||
...locale.rtl && {
|
||||
rtl: true
|
||||
}
|
||||
}))
|
||||
};
|
||||
}
|
||||
|
||||
//# sourceMappingURL=localizationConfig.js.map
|
||||
Reference in New Issue
Block a user