I am a new comer for contributing the code for MediaWiki.
(don't mind if my English is not good enough)
I am having a proposed changes for the function headElement() function,
which accepts various language while in different language code. The main
propose of this changes is to display the correct language/font correctly.
This problem is already exists in the Chinese wikis, which the language is
in Chinese, however the browsers (at least IE and Firefox browsers) are
detected as a Simplified Chinese webpage.
The problem have been discussed in its local Wikipedia pages:
(All these webpages are from Chinese Wikipedia, in Chinese language)
And according to those pages, the users generally have a consensus to having
a change of display the language/font when it's in Traditional Chinese.
The display language has been tested under Internet Explorer and Firefox,
the results have been shown below:
IE = Internet Explorer
FF = Mozilla Firefox
SC = Simplified Chinese
TC = Traditional Chinese
TC-HKSCS = Traditional Chinese (Hong Kong Suppmelmentary Character Set
! = There's some problem when displaying the language of the webpage, the
language is incorrect
zh: SC(IE), SC(FF)
zh-hant: TC(IE), TC(FF)
zh-hans: TC(IE)!, SC(FF)
zh-cn: SC(IE), SC(FF)
zh-tw: TC(IE), TC(FF)
zh-hk: SC(IE)!, TC-HKSCS(FF)
zh-mo: SC(IE)!, SC(FF)!
zh-sg: SC(IE), SC(FF)
however, the Internet Explorer browser does not perfectly supporting the
zh-hans and zh-hant tags respectively. So to fix this language/font problem,
we need a several PHP scripts to display that properly. the steps are
1. Detects if a user is logged on or not, if so do the display language-code
check against the language value in user perferences;
2. If the user is not logged on, do the display language-code check against
the HTTP_ACCEPT_LANGUAGE value;
3. If the browser does not support the HTTP_ACCEPT_LANGUAGE (for very old
browser only). Automatically fallback to global language.
For display language code checking:
1. Detect is that a non zh-cn ot zh-tw installation, if so return the global
2. Do the match for the language against several language-codes, if matches
return the display language code;
3. When none of them above matches, then automatically fallback to the
(this part of code can also performed besides the Chinese language)
For solving this problem, I've wrote a piece of code to there, however,
there's no idea which file are better inserting these pieces of code, or in
a seprate file. After I have had suggestions from here, I will put my code
into Bugzilla to do the checkout of my piece of code.
Wikitech-l mailing list
|Free forum by Nabble||Edit this page|