Hello all,
straight to my problem. I’ve been trying to set up a multilang site on single lang site (I downloaded the starter kit at the beginning) and so I have added the example code, only changed Germany to Czech:
c::set('languages', array(
array(
'code' => 'en',
'name' => 'English',
'default' => true,
'locale' => 'en_US',
'url' => '/en-us',
),
array(
'code' => 'cs',
'name' => 'Czech',
'locale' => 'cs_CZ',
'url' => '/cs-cz',
),
));
And it works. Except one thing. When I change template for an existing page (even for created after multilang config), the non default language content stays in the folder. So e.g. after few changes I have this in my case:
/content/page
- about.cs.txt
- contact.cs.txt
- default.cs.txt
- eshops.cs.txt
- eshops.en.txt
- pricing.cs.txt
And at some point the panel gets broken and it’s not possible to edit non default lang page. I guess it happens when you change to a template which contains the same blueprint fields as some of the previous ones, because not only the content remains in the folder, but on top of it, it also inherits the previous content.
E.g. in my case:
-
eshops.en.txt - which is default lang and is correct contains these data
Title: page
Content1: en eshops pricing eshop just lorem ipsum
-
eshops.cs.txt - which is not default lang contains much more data, because it includes fields from previously set templates
Subheadline:
Title1:
Title2:
Content2:
Title3:
Content3:
Title4:
Content4:
Title: page
Intro:
Content1: cs eshops pricing eshops just lorem ipsum
Can you please help me to fix this and force Kirby to automatically remove the content and keep only the relevant fields?
Thank you in advance for your answers.