Sorry, we don't support your browser.  Install a modern browser

New behavior of creating multilingual pages#145

Sorry for the long explanation in advance, but it needs a little more detail to be understood :-)

Current behavior of creating multilingual pages:

Setup:

  • Multilingual project, configured with [en] and [de] as languages
  • [en] is default language
  • template test
  • Kirby version 3.4.4

Creating a page in default language:
If you create a new page in default language [en], Kirby creates an initial file test.en.txt. After filling the page with content (text fields, builder, etc.) and saving it, the file test.en.txt is updated. Everything works as expected.

Now switch to the [de] version of this page: The complete content is taken from the [en] version, all fields are already filled with [en] content to facilitate translating (which is nice) and page preview works already, although the page has not yet been saved. It looks like a regular page (just with wrong content) for an editor. But: a file called test.de.txt is not yet created and there is also no button to save (and create one). After changing anything, the save button appears and the file test.de.txt is finally written after saving. Once saved, you will have two separate versions, and each language will be treated individually.

Creating a page in non-default language:
If you create a new page in non-default language [de], Kirby creates an initial file test.en.txt. After filling the page with content (text fields, builder, etc.) and saving it, the file test.de.txt is written with all my content. The [en] version stays empty.

I have a lot of experience with multilingual projects (up to 8 languages / project), but it took me a while to figure out what Kirby exactly does, especially if you don’t look at the file system.

The problem of the current behavior in my opinion is:

  • An editor will not notice whether the content is filled just to facilitate translation, or whether the content is already available, especially if you work on both language versions and switch between them often.
  • You have to start with the default language to benefit from the prefill feature.
  • You may not switch to a non-default version and change anything, because once anything is edited, the prefill feature is gone as well.

My suggestion:
Do not fill the non-default version with default content, but add a function to copy content from any language to another. It would optimize the current work flow and would be a big benefit for editors and translators:

  • Especially for editors it would be much clearer what happens between the different language versions of a page.
  • You could start with any version (not only default) and simply copy the content to another language when finished. E.g. you could start with english, copy to german when finished and then copy the german version to french when finished, etc. It is possible that not every translator speaks the default language.
  • You could re-copy (and overwrite) content if lots of things changed in one version. Sometimes it’s better to start from scratch again instead of comparing two versions. Not only for text, but for settings, images and other options, etc. it would be very helpful.
  • Sometimes you need an empty version without filled content which is currently not possible. If you currently need an empty language version, you have to delete each prefilled content block.
2 days ago