Change fallback language

Fragment of a discussion from Project:Support desk
Jump to: navigation, search

$wgLanguageCode change language of all messages. I want to change language only for untranslated ones.

AS (talk)10:09, 2 August 2012

You would have to modify the file languages/messages/Language<LangCodeYouHavewgLanguageCode-setto>.php . Look for the line $fallback = '<lang code>';. It's probably near the begining.

Note, modifying language files in this manner is unsupported, and will probably break (be reset to the normal default) when you upgrade mediawiki. (I'm not sure if the localization cache will automatically clear itself. I think it does, but if it doesn't you may have to run the rebuildLocalisationCache.php maintinance script)


(You probably already know this, but in the interest of completeness) If there's a specific message you want to change the value of, you can edit it by going to the page Special:allmessages.

Bawolff (talk)14:22, 2 August 2012
Edited by 0 users.
Last edit: 15:21, 2 August 2012

Thanks! I thought this LanguageXX.php files are in some way cached from online storage xD

AS15:21, 2 August 2012

In general MW just uses the local files (While they are actually further cached internally in the db/memcached). However some wikis (like WMF wikis) use an extension called extension:LocalisationUpdate which automatically syncs those files with http://translatewiki.net

Bawolff (talk)16:02, 2 August 2012
 
 

A bug has been filed for this.

Allen4names (talk)07:02, 3 August 2012

That bug is actually for something different but related (How wikidata does fallback for multilingual data items, vs this is about how fallback is done for interface messages)

Bawolff (talk)12:12, 3 August 2012