Page MenuHomePhabricator

[Bug] Language fallback seems to apply even when not requested
Open, MediumPublic



    "nb": {
        "language": "nb",
        "value": "Gresk kunst i antikken"
    "no": {
        "language": "nb",
        "value": "Gresk kunst i antikken"

Is this intended behaviour when languagefallback is *not* selected? How can I retrieve the actual 'no' value ("Antikkens gresk kunst", see I need this since I'm working on a semi-automatic tool to remove terms from deprecated languages.

Event Timeline

Danmichaelo raised the priority of this task from to Needs Triage.
Danmichaelo updated the task description. (Show Details)
Danmichaelo added a subscriber: Danmichaelo.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
daniel triaged this task as Medium priority.Jun 15 2015, 6:22 PM
daniel added a subscriber: daniel.

This is indeed strange, especially since there is a distinct value in "no": "Antikkens gresk kunst". So the "nb" value shouldn't be used for "no", even if languagefallback was enabled. Strange...

Oh, there we go. From DefaultSettings.php:

Warning: Don't use language codes listed in $wgDummyLanguageCodes like "no"
for Norwegian (use "nb" instead), or things will break unexpectedly.

Yay. The correct language codes for norwegian are "nn" and "nb", I think. "no" is invalid, but supported as an alias for "nb":

  $wgDummyLanguageCodes = array(
	  'als' => 'gsw',
	  'bat-smg' => 'sgs',
	  'be-x-old' => 'be-tarask',
	  'bh' => 'bho',
	  'fiu-vro' => 'vro',
	  'no' => 'nb',
	  'qqq' => 'qqq', # Used for message documentation.
	  'qqx' => 'qqx', # Used for viewing message keys.
	  'roa-rup' => 'rup',
	  'simple' => 'en',
	  'zh-classical' => 'lzh',
	  'zh-min-nan' => 'nan',
	  'zh-yue' => 'yue',

Wikibase shouldn't allow "no" for input, or map it to "nb". I'll add a ticket for that.

Jonas renamed this task from Language fallback seems to apply even when not requested to [Bug] Language fallback seems to apply even when not requested.Sep 10 2015, 3:44 PM
Jonas set Security to None.
Jonas added a subscriber: Addshore.
adrianheine added a subscriber: adrianheine.

I removed it from the language fallback epic since this is about a related, but different feature.

Why you want no? If you want riksmal you need to use nb-riksmal, and for Hognorsk we have nn-hognorsk.