Pages translated only for some languages

Is there any solution for this multilingual scenarios?

  1. I have career subpages and want versions only for defined languages, it’s impossible set job page published in one language and draft for others. When I create job page for non default language, content txt file is created also for default language. How can I manage this?

  2. How can I list subpages only if translation exist (not empty content file which is created automatically for default language)?

Thanks

  1. I think the default language is always created, maybe you have to work with a special field, for example a toggle which sets translated to true (or something like that)

  2. I am doing the following on my article-template:

if(!$page->translation($kirby->language()->code())->exists()) {
	go($kirby->language()->code( . '/error/' . $page->uid());
}

It looks for the translation of the page, if it’s not found, it’ll show the error page. Maybe you can use something like that with a filter in your listing.

But your solution check if language file exist, so for default language it’s not working, Am I right?
It’s possible only throu checking special language field?

Thanks

Instead of adding a custom field, you could check if an important content field like the main text field in the default language (or the other languages) is empty (should be a field that can definitely serve as an indicator if the translation can be regarded as “existing” or not)

Make sense, but custom field give more control. In some cases something like draft, where content is not complete but still not ready for publish. Independent statuses for languages would be perfect, but I understand technical limits.

Thanks to all

Well, yes, of course, I’d always prefer a custom field. But since you asked if there was an alternative…

Hi, I’m using custom field for checking if specific language exist like I mentioned above.
Is it possible hide this pages in pages section for specific language in admin?

For example job page “exist” only in specific language and is listed in career admin pages section only in this language.

Thanks

Hi everyone, I’m landed here because I’m looking for a solution to what @illycz stated at the beginning:

it’s impossible set […] page to published in one language and draft for others

Is this still so in v5? Do anybody came up with some solution to enable a language-dependent page status?

It feels to me, that adding a bool field like “translation completed“, would result being a sort of exception to the Kirby’s clean logic, for the CMS user.

Thanks in advance.

Yes, there is no draft status for translations, only for complete pages (as a page is defined as a folder and that folder has a status).

Marking translations as completed is therefore currently still the way to go.

Ok, thanks @texnixe

And would be possible to show this field “Translation Completed“ on the back-end, only for the non default language?

To do so maybe I should change on the /site/blueprints/pages/default.yml maybe? And than treating the variable on the default page template to manage the front end part?

Would be this the approach that you, experienced users, would use to make it the most efficient possible?

Many thanks

Not out of the box, but with a little workaround, see Disable add button for secondary languages - #15 by texnixe