Last modified: 2013-10-23 18:17:03 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T35296, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33296 - $wgLanguageCode with underscore broken since 1.18
$wgLanguageCode with underscore broken since 1.18
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Internationalization (Other open bugs)
1.18.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: code-update-regression
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-21 08:16 UTC by Raimond Spekking
Modified: 2013-10-23 18:17 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Raimond Spekking 2011-12-21 08:16:08 UTC
Since 1.18 

 $wgLanguageCode = "de_formal" 

is broken. Interface language is English instead. Changing to "de-formal" works but all existing installations are still broken.
Comment 1 Siebrand Mazeland 2011-12-21 08:18:10 UTC
IIRC that should have been de-formal all along, and de_formal is a misconfiguration, as far as I can tell. Can you point to any documentation that says otherwise (including that in any previous MediaWiki version)?
Comment 2 Raimond Spekking 2011-12-22 09:27:15 UTC
I have tested installation back to MediaWiki 1.12. "de-formal" was set by every installation script. So I have no idea where something is documented "de_formal". With exception of the message file itself: MessagesDe_formal.php

I got the error report by e-mail and I have asked the reporter now where he found "de_formal".
Comment 3 Wolfram Langer 2011-12-22 09:58:23 UTC
As the one who reported the issue to Raimond Spekking, I am following up here on Bugzilla.

> I got the error report by e-mail and I have asked the reporter now where he
> found "de_formal".
As stated under http://www.mediawiki.org/wiki/Manual:$wgLanguageCode, the language code should refer to the Message(.*).php file.

"Site language code. Should be one of the ./languages/messages/Messages(.*).php files."

Since the file name is MessageDe_formal.php, I thought to use "De_formal" - which worked until MediaWiki 1.17.0.

There seems to be a confusion in the community about what "$wgLanguageCode" should contain: during configuration of several MediaWiki sites, I found searched the internet and found different recommendations, including "De_formal". The latter sounded to me the most logical one since it resembles exactly the part of the Message(.*).php file name.

I guess that this confusion is strengthened further by the following quote, although, however, it clearly refers to the old MediaWiki 1.6.8:

http://www.mediawiki.org/wiki/Manual:$wgLanguageCode
"In 1.6.8: the string is case sensitive. The installer installs though small (for example "de"). This results into only a partial use of the language file. This is fixed if you use "De", which then uses the LanguageDe.php correctly."

For me, the issue seems not being a bug but rather a configuration issue which could benefit from an improved documentation.

I recommend to add a clear statement to 
http://www.mediawiki.org/wiki/Manual:$wgLanguageCode
like the following:

"Site language code. In recent versions of MediaWiki, the language code is always lower-case and can optionally contain a hyphen.
Valid examples are:
* en
* en-gb
* de
* de-formal
The language code instructs MediaWiki to referring to one of the ./languages/messages/Messages(.*).php files. Hence, the language code can be inferred from the respective Messages(.*).php file name."
Comment 4 Niklas Laxström 2011-12-22 11:29:10 UTC
Documentation updated. Please let me know if it is unclear.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links