Problem/Motivation
#2851029: Disallow removing a language when there is content or config related to that language lists lots of data that is left around on the site when a language is removed as of this writing. Also node data is partially updated but is left in an unrecoverable state when the language is removed currently. Language may be at many places, some configuration may exist in the language, entity translations may exist, etc. There is not one good way to resolve that when removing a language so ideally the user is stopped from removing a language when there is still content in the language. That is discussed in #2851029: Disallow removing a language when there is content or config related to that language.
However there should be a way to hide languages from frontend users if the language should not be advertised from the site anymore, until the site admin figures out how to remove the data properly.
Steps to reproduce
Proposed resolution
Add the concept of disabled languages. There is https://www.drupal.org/project/disable_language already for this, so can be used as insipiration.
As disabled languages may be used to "stage" new languages for the site, we should not hide this language from the backend, but the frontend should not see that this language is there.
Comments
Comment #2
catchI've never used the disabled languages module, but the functionality described in the issue summary looks about right to me. Not sure about the redirect, we might want to issue a 404 instead.
Comment #3
gábor hojtsyFound #1539072: Support for disabled languages broken, drop it which is where we removed it, it has the chat log between catch and me :D
Comment #4
gábor hojtsyAlso #1314250: Allow filtering/configuration of which languages apply to what (UI, nodes, files, etc) proposes different contexts of language where some contexts may have a different language list. I think that would overcomplicate things personally. Even having a disabled / enabled state would allow frontend contexts to hide the language and admin contexts to still get rid of the language.