Skip to content

Comments

Add support for translate: false fields in multilang setups#3

Open
johannschopplich wants to merge 1 commit intogetkirby:mainfrom
johannschopplich:feat/merge-untranslated-fields
Open

Add support for translate: false fields in multilang setups#3
johannschopplich wants to merge 1 commit intogetkirby:mainfrom
johannschopplich:feat/merge-untranslated-fields

Conversation

@johannschopplich
Copy link

Description

Adds support for getting field content for secondary languages if the field is created with translate: false.

Summary of changes

  • Fetches the current language & default language's content from the DB.
  • Merges DB rows with null with their default language counterparts.

Reasoning

Currently, fields with translate: false are displayed with their empty state in the Panel. Furthermore, accessing the field content will result in a empty value.

This is because the primary language's data for the field is not retrieved from the DB.

Additional context

This is probably not the most semantic or correct solution, but it works for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant