This commit is contained in:
2026-07-31 23:21:51 +02:00
parent f6b4b36df8
commit f14f2cfd98
294 changed files with 5880 additions and 0 deletions
+19
View File
@@ -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