The language on MonoLingualString shouldn't be a Z6/String, but a proper type. This will allow us to type check the field and to support better entry of the field.
What would be the right type? Given how we are using these strings, here are a few candidates:
- MediaWiki interface language
- Wikipedia project code
- MediaWiki content language / Wikipedia project language
- Wikidata Lexeme language
- Wikidata label language
- BCP 47 language (or some other appropriate external standard)
- A new language object for Wikilambda
It is likely that these different definitions of language will all appear at one point or the other.
Right now we are using the language codes for representing labels for types, keys, etc. Given that, these language codes must actually align with how MediaWiki treats languages. So we probably should go for interpretation 1 given above.
Given that, MonoLingualString and MultiLingualString need to be understood as being mono- or multi-strings based on the MediaWiki interface language. Maybe a more obvious name would make sense, but since we don't have any of the other interpretations yet, we can maybe avoid renaming that to something even more clunky (also, remember, the name will be editable in the wiki anyway - this about the name of the internal PHP Shadowclass).