I so far never had any issues with translations, but on one site, I have a problem, and Iâm uncertain if itâs Kirby or something else making this happens.
I have a structure field on in the site.yml. The user can set SVG assets for the footer there, along with a text title and a URL.
Now I try to translate this structure field, but it doesnât work. The panel always picks up the main language content.
I set my logos and save
I switch to another language in the panel
I delete all fields from the structure field and create new ones with the translated logos
I save and the panel shows the update. Also, the content file was updated.
When I hit refresh in the browser, the panel again shows me the content of the main language instead of the translation. Though the content file e.g., site.fr.md, shows the translated content
Possibly, the API then also returns the main language content always instead of the translations, even though the translated content file has the correct, translated content.
I could simply replicate this in the occurring CMS instance by simply creating another structure field in site.yml with only a text field.
Can somebody else replicate this when using a structure field than can be translated, in the site.yml?
I updated Kirby to the latest version to ensure this is not a known issue that might have been patched meanwhile.
Also, Iâm using content.extension set to md in the config.php.
The site.yml. footer_logos is the original field, test_field is where I checked if it happens to any structure field.
title: Site
options:
preview: "{{kirby.option('url_frontend')}}/{{kirby.language}}/{{page.uri}}"
tabs:
main:
label:
de: Ăbersicht
en: Overview
columns:
left:
width: 2/3
sections:
pages:
headline:
de: Seiten
en: Pages
type: pages
status: all
sortable: false
sortBy: title asc
image:
back: white
right:
width: 1/3
sections:
settings:
label:
de: Allgemein
en: General
type: fields
fields:
main_navigation:
label:
de: Hauptnavigation
en: Main navigation
type: pages
translate: false
image:
back: white
secondary_navigation:
label:
de: Sekundäre Navigation
en: Secondary navigation
type: pages
translate: false
image:
back: white
footer_navigation:
label:
de: Fusszeilen-Links
en: Footer links
type: pages
translate: false
image:
back: white
test_field:
type: structure
fields:
text:
type: text
footer_logos:
label:
de: Fusszeilen-Logos
en: Footer logos
type: structure
fields:
name:
label: Name
type: text
required: true
logo:
label:
de: Logo
en: Logo
type: files
query: site.files.filterBy('extension', 'svg')
uploads:
parent: site
template: svg
required: true
href:
label: Link
type: url
translations:
label:
de: Ăbersetzungen
en: Translation
sections:
translations:
type: fields
fields:
list:
label:
de: Allgemein
en: General
type: variables
editor:
sort: true
mutate: true
settings:
label:
de: Einstellungen
en: Settings
fields:
terms_privacy:
label:
de: Datenschutzvereinbarung
en: Privacy policy
help:
de: Wähle die Seite, welche die Datenschutzvereinbarung enthält. Diese wird dann vor der Verarbeitung von Benutzerdaten, beispielsweise bei Formularen, angezeigt und verlinkt.
en: Choose the page containing the privacy policy. This page will be linked and shown in all cases of user data collection, e.g. in forms.
type: pages
multiple: false
translate: false
terms:
label:
de: Allgemeine Geschäftsbedingungen (AGB)
en: Terms and conditions
help:
de: Wähle die Seite, welche die AGB enthält.
en: Choose the page containing the terms and conditions. This page will be linked and shown in all cases of user data collection, e.g. in forms.
type: pages
multiple: false
translate: false
event_signup_recipient:
label: Veranstaltungsanmeldungen senden an
type: email
webhooks:
label: Webhooks
type: structure
help:
de: Nur Anfassen, wenn du weisst was du tust.
en: Only touch if you know what you're doing.
fields:
url:
label: URL
type: url
payload:
label: Payload
type: text
default: "{}"
triggers:
label: Triggers
type: tags
options:
- "page.create:after"
- "page.update:after"
- "page.delete:after"
- "page.changeStatus:after"
- "page.changeSlug:after"
- "page.changeTitle:after"
- "page.duplicate:after"
- "file.changeName:after"
- "file.delete:after"
- "file.replace:after"
- "file.update:after"
``