The MultiLang feature in Ragnaroek has only one fallback language and the default workflow has the concept of one certain master language (content is always created in the same specific language and translated in others).
I needed a different kind of MultiLang where I can create content in any language. Different areas of the site have different languages and there's no common language which could be used as a master language in the whole site. Also it should be possible to create the initial content in any language, so the workflow should be automated/transparent instead of the default master language one.
Unfortunately it is too hard to actually implement this correctly in midgard-core. It is too hard to actually have multiple fallback languages. That's because the internal SQL queries must return only the best matches (the MultiLang is basically impemented in SQL level) and adding more fallback languages to the queries would complicate them a lot... (I wasn't sure if it's impossible but at least it would be very complicated to do and doing it would risk introducing new hard to solve bugs.)
It seems the best practical way to solve this is to just automatically copy the content to all site's languages. I first tried to copy the best matching content to lang0, which worked, but deleting the objects become impossible then (MidCOM doesn't understand that even though the content is only in lang0, it should be deleted from langX so that when content is gone, the fallback is also gone as otherwise the content would just show indefinitely - the actual delete would have been possible to implement but the problem was toolbar and components which couldn't of course understand that they should provide the delete links/forms...). I implemented it as an external feature but for easier usage and better maintenance, it should be added to MidCOM itself.
This unfortunately can't be a component because default_lang needs to be set very early in the request to make sure everything works correctly in all circumstances. Well this *can* be a purecode component (or a similar watcher could be implemented but that would not handle deletes automatically) of course but then its usage requires multiple lines of code (would be almost the same as not having this in MidCOM). Easiest usage requires that this feature is a midcom.core service which is added to midcom_config and activated automatically in midcom.php when enabled. This is not something absolutely necessary to have in midcom.core but it seems having it there is the best option (I bet the code is simpler this way than as a component - also this code is simpler/shorter/faster and more bullet-proof than if the same functionality is done as a watcher - with this code this basically goes straight to Midgard API and therefore belongs to midcom.core). This is purely a new feature and if this is not used, the *only* line of code being executed is the check for its midcom_config setting (one if clause which checks if the setting has something or is false/empty).