backdrop-contrib / i18n

Collection of modules to extend Backdrop CMS multilingual capabilities
https://backdropcms.org/project/i18n
GNU General Public License v2.0
2 stars 5 forks source link

Default language selection #93

Closed laryn closed 2 years ago

laryn commented 2 years ago

In another thread I mentioned this setting under admin/config/regional/i18n/node: Screen Shot 2022-03-10 at 4 19 00 PM

This general setting can be overridden on a per-content-type basis: Screen Shot 2022-03-10 at 4 32 28 PM

It doesn't seem to work, however. I've got a PR that seems to work for me which I'll submit here for review.

indigoxela commented 2 years ago

@laryn many thanks for the report and PR. Need to dig a little deeper to fully understand the problem and patch. Stay tuned.

indigoxela commented 2 years ago

Ahem, wait...

Default language for content types with Multilingual support disabled.

Note the Multilingual support DISABLED.

It's not about the settings for multilingual sites - seems like a misunderstanding. :wink:

laryn commented 2 years ago

Ahem is right, but something is still wrong I think -- even without the node form having "Set current language..." checked it keeps showing the current language for me.

indigoxela commented 2 years ago

even without the node form having "Set current language..." checked it keeps showing the current language for me.

Can you clarify that a bit? What is checked and what does "keeps showing the current language" mean? What would you expect if there's no default setting? (If I get that part right...)

laryn commented 2 years ago

I'd like the default selection to be LANGUAGE_NONE but it keeps preselecting the current language, even though I haven't checked the box for "Set current language as default..." in the content type settings.

indigoxela commented 2 years ago

Ah, now I get it. Should be fixed in https://github.com/backdrop-contrib/i18n/commit/28a5f855f8f7a498cabb12b6e2069b75efd45766

laryn commented 2 years ago

Tested and it works!