2.2 KiB
Web Paylod CMS testing
Integrate english in the future
Two things remaining:
-
Connect DeepL Get an API key at deepl.com (free tier = 500,000 chars/month, plenty for a B2B site). Add to .env.local locally and .env on the server: DEEPL_API_KEY=your_key_here To translate a page, find its ID in the Payload admin URL (e.g. admin/collections/pages/abc123) then call: bashcurl -X POST https://fiberdirekt.se/api/translate
-H "Content-Type: application/json"
-H "Cookie: payload-token=your_admin_token"
-d '{"pageId": "abc123", "collection": "pages"}' It will translate all Swedish text fields and save them as English in one shot. RichText fields (FAQ answers, body text) are skipped — do those manually in the Payload admin by switching the locale tab to EN. -
Wire the LocaleSwitcher into the nav When English content is ready, open src/Header/Nav/index.tsx and add the import and component. Find where the nav actions/CTA button sits and place it nearby: tsximport { LocaleSwitcher } from '@/components/LocaleSwitcher'
// Then inside the JSX, next to the CTA button: That's it — the component already handles the path swapping logic. Commit, push, deploy.
Recommended order:
Build out Swedish content fully and launch Use DeepL endpoint to batch-translate pages Review and fix translations manually in Payload admin Wire in the switcher Add /en/page.tsx root redirect (already done)
Comments on what to fix
Can we get filler text in blocks as standard ?
Hero should default to none, or we should try to remove it!
Preview thumbnails for blocks ??
~~Why is slug defaulting to one letter? ~~
~~Fix corners and embed for video block ~~
Fix posts formatting to be better
~~FAQ is not rendering answer text ~~
~~Where does the form submission text come from ??? ~~
~~Skicka förfrågan forms button needs to be updated ~~
~~A CTA block without Image ~~
~~Change the cookies banner to full screen width instead of rounded corners floating ~~
Funktionalitet att bekräfta, test med Erik
-
Subscribe to newsletters, connection to API GANL
-
Få en offert (Lime, GANL, epost?)
* Forms generellt?
* Matomo Tracking
* Cookies consent
~~* Lime forms integration ~~
* Other code embedding