So why I need to change that value at there to make the lang attribute is not fixed by the $wgContLanguageCode value? It's a quite a long story to tell why I proposed to doing this.
======================================================================
It's been seen that there are some discussions that have complained by other users regarding the font rendering problem. (http://zh.wikipedia.org/wiki/Wikipedia:%E4%BA%92%E5%8A%A9%E5%AE%A2%E6%A0%88/... E6%8A%80%E6%9C%AF/%E5%AD%98%E6%A1%A3/2005%E5%B9%B412%E6%9C% 88#.E7.B9.81.E9.AB.94.E7.B6.B2.E9.A0.81.E8.83.BD.E5.90.A6.E6.94.B9.E6.88.90.E6. 96.B0.E7.B4.B0.E6.98.8E.E9.AB.94.EF.BC.9F (in Chinese, Translating the message into English: "The readers in Taiwan and Hong Kong are commonly use the MingLiu font to see the Chinese contents, and using MingLiu font is more friendly to the readers from Taiwan and Hong Kong." (my additional note: MingLiu is the Traditional Chinese system font that is used in Windows OS))).
And also something that request to add a character to the Conversion Table: (http://zh.wikipedia.org/wiki/Wikipedia:%E7%B9%81%E7%AE%80%E4%BD%93%E8%BD%AC% E6%8D%A2%E8%AF%B7%E6%B1%82#- .7Btw:.E8.A7.92.3Dhk:.E8.A7.92_.E2.89.A0_cn:.EF.A0.B3.7D- (in Chinese, Translating the message into English: "The character 角 is different to 角, requesting that character to be added into the conversion table" (my additional note: since both character 角 in Traditional/Simplified Chinese shares the same unicode number [U+89D2], There are only difference when using Traditional Chenese and Simplified Chinese fonts.)))
======================================================================
So regarding to those complaints mentioned above, we would likely to see where's the issue come from. And the user called 百楽兎(which is the original bug submitter in bug 5790) has found out the following tag causes the font problem: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh" lang="zh" dir="ltr"> while the lang attribute [zh] is determine as Simplified Chinese in most browsers, so I had investigate which PHP file containing thost stuffs at there.
As I examine the code in the beginning, I have to find out where is the issue that happens, so I used the phase "http://www.w3.org/1999/xhtml" fo find out which file has containing this string.
While I've found out the <html> tag is in the OutputPage.php and Monobook.php, it's likely that the lang attribute is fixed by the value $wgContLanguageCode. So I would think that "how to make the lang attribute varies, *without changing any values including the $wgContLanguageCode value*".
======================================================================
From this point, I know that the functionallies for those two files and the
Language Converter:
OutputPage.php - the main part that *outputs* the <html> tag in the old skins. Monobook.php - the main part that *outputs* the <html> tag in the new skins. LanguageConverter - the Language Converter, this is used to change the text of contents *only*.
As I think that the functionally of the LanguageConverter is to have changes the text of contents only, and it does not changing any attributes defined in HTML code. Also, I have considered to using the language variant value that told by Brion, however it is quite impossible to determine the lang attribute from the language variant. (in zh, there's 25 combinations that can be used.). It's likely have problems while the user interface language is set to Traditional Chinese [zh-tw/zh-hk] and the language variant has been turned off [zh]. It would render the Traditional Chinese interface, using Simplified Chinese font. According to this case it is quite obvious that we cannot use the language variant to determining the lang attribute. And I think that it would overdo the LanguageConverter if we adding that function into there. So I think that if there's an alternate way to achieve the goal (to check *both* user interface language and $wgContLanguageCode).
So I put the function that determining the lang attribute into OutputPage.php and Monobook.php, and I've tested on the local installation, the lang attribute detection using *both* user interface language and $wgLanguageCode is succeeded. However Brion said that that would affects the cache (no idea *how* would the cache is affected).
So there's sonething I wanna to ask: If my design (I mean the lang attribute detect function) don't have the problem, how to solve the cache issue that Brion has been mentioned? And if Brion's method (using the language varient to detect the lang attribute) is used, how would we solving the problem in some cases (UI=zh- tw,V=zh or UI=zh-hk,V=zh), and where we can put the code?
regards and thanks Man
------------------------------------ A little test to testing the font rendering Copy the stuffs into the text editor and save as a HTML file:
<span lang="zh-cn"><font size=6">角 骨 解 述</font></span><br/> <span lang="zh-tw"><font size=6">角 骨 解 述</font></span><br/> <span lang="ja"><font size=6">角 骨 解 述</font></span><br/>
use a browser to test it. It shows that even have the same unicode character, it would renders in different way (even I've tried in my Linux (FC5) and the Linux machines in my school (which runs FC4), the character 述 renders into different word.)