Wikidata/Notes/Language fallback: Difference between revisions

Content deleted Content added
reworked
Answer question
Line 22:
Languages have relationships with each other which can be used to build fallback chains so labels in a language with a close relationship can be used if a specific label in a given language is missing. For example is the South Saami language part of the Southern group, which is again part of the Western group of Saami languages. [http://www.ethnologue.com/show_language.asp?code=sma] In that group there is also a Northern group and languages in that group are Northern, Lule and Pite Saami.
 
Mediawiki defines fallbacks for languages (QUESTION: defined where?in the languages/messages/MessagesXY.php files, see $fallback). For a specific language a list of fallbacks can be acquired, with a default language as a final fallback. Each one of the fallbacks can then be tested against whatever strings there might be in any of the language, and the string for a specific language can then be returned. If no match is found before the end of the chain a second pass can be done, but this time by checking the fallbacks for the initial list.
 
At present there are only few languages that define fallback. This is rather awkward for our use, but it is perhaps a wanted behavior for an ordinary wiki. A first attempt could be to extend the fallbacks with languages from the same group, perhaps also supergroup, and if this is impossible then to go for a hook and do something similar but specific for our extension.