Hi,
AFAIK there is no document on mediawiki.org which says this definitively yet. what order are the following things consulted in, in finding a relevant system message?
XX - wiki's default language (not en, for argument's sake) YY - user's language preference (not en or XX) ZZ - language code specified in the URL as uselang=ZZ (not en, XX or YY)
A MessagesEn.php B MessagesXX.php C MessagesYY.php D MessagesZZ.php E MediaWiki:Message F MediaWiki:Message/XX G MediaWiki:Message/YY H MediaWiki:Message/ZZ ??? any others???
(assume also for interest's sake that a particular one may not be defined, so it has to keep looking)
Is this the order? H E D B A
thanks, Brianna
Hoi, As far as I understand it, for an anonymous user the message is first the language of the Wiki, then the fall back language for that language and then English. When a user has set a preference, it is this language then a potential fall back language and then English.
You always get a message, whether or not you get the message. Thanks, GerardM
On Tue, Mar 25, 2008 at 3:10 PM, Brianna Laugher brianna.laugher@gmail.com wrote:
Hi,
AFAIK there is no document on mediawiki.org which says this definitively yet. what order are the following things consulted in, in finding a relevant system message?
XX - wiki's default language (not en, for argument's sake) YY - user's language preference (not en or XX) ZZ - language code specified in the URL as uselang=ZZ (not en, XX or YY)
A MessagesEn.php B MessagesXX.php C MessagesYY.php D MessagesZZ.php E MediaWiki:Message F MediaWiki:Message/XX G MediaWiki:Message/YY H MediaWiki:Message/ZZ ??? any others???
(assume also for interest's sake that a particular one may not be defined, so it has to keep looking)
Is this the order? H E D B A
thanks, Brianna
-- They've just been waiting in a mountain for the right moment: http://modernthings.org/
Mediawiki-i18n mailing list Mediawiki-i18n@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-i18n
On 26/03/2008, Gerard Meijssen gerard.meijssen@gmail.com wrote:
Hoi, As far as I understand it, for an anonymous user the message is first the language of the Wiki, then the fall back language for that language and then English.
What does "fall back language for that language" mean? Are you referring to getting messages from MediaWiki: pages or MessagesXX.php files?
And what happens when the uselang=XX parameter it used in the URL? which was my original question.
thanks Brianna
Fallback languages are sort of "back-up" languages. For example, language AA has language BB as fallback. So if a message doesn't exist in AA, it uses the message from BB. If that doesn't exist, then it will use the message from en. (However, I think that if language BB has a fallback, it might use that instead. So you have language CC as well. And that can in theory go on through all languages, though that's not likely at all. Not sure about that though.)
So we have the following cases:
en: the global fallback language xx: any fallback language. All languages can have one, except for English. AA: the language of a wiki BB: a language set in a user's settings CC: a language set by ?uselang=
So the order if a message doesn't exist in a given language is the following:
Case 1: Default, on a non-English wiki:
AA AA-xx en
Case 2: If a user has a different language in their settings:
BB BB-xx en
Case 3: If a different language is set by ?uselang=
CC CC-xx en
For MediaWiki:message/yy, I believe that is the same, but I have not tested it. Also, I believe there is a bug about this, for cases 2 and 3, that it should fall back to AA instead of en. I don't know its number though.
2008/3/26, Brianna Laugher brianna.laugher@gmail.com:
On 26/03/2008, Gerard Meijssen gerard.meijssen@gmail.com wrote:
Hoi, As far as I understand it, for an anonymous user the message is first
the
language of the Wiki, then the fall back language for that language and
then
English.
What does "fall back language for that language" mean? Are you referring to getting messages from MediaWiki: pages or MessagesXX.php files?
And what happens when the uselang=XX parameter it used in the URL? which was my original question.
thanks Brianna
-- They've just been waiting in a mountain for the right moment: http://modernthings.org/
Mediawiki-i18n mailing list Mediawiki-i18n@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-i18n
OK, these are the relevant bugs I found.
1495 Undefined messages in user language don't fall back to MediaWiki: customizations If a message is defined in MessagesEn.php but not MessagesXX.php, and MediaWiki:Somemessage exists, but MediaWiki:Somemessage/XX doesn't, when the message is requested in language XX, instead of getting MediaWiki:Somemessage, you get the message from MessagesEn.php. (But interestingly if it doesn't exist in Messagesen.php ie is a totally custom message, then you WILL get the MediaWiki:Somemessage as expected.)
8821 When using another language, messages of "-" that are not exist in the DB are shown as "<message>" I don't totally understand when this bug shows itself.
8188 Display changed content-language messages in preference to default interface-language messages I think this is the main bug about it. Rotem Liss describes the following algorithm that is supposed to represent current behaviour: ("content language" = "wiki default language")
1. Check for a page in MediaWiki namespace and use it as a message: 1a. If the interface language ("uselang" page parameter or from preferences) is not the content language, use the page "MediaWiki:Message/lang". 1b. If the interface language is the same as the content language, use the page "MediaWiki:Message". 2. If the message is still not received, check in the extension messages (irrelevant, as uploadtext and the others are not extension messages). 3. If the message is still not received, check for it in the localised language file. Fallback message from the language file may be used if not exist, and English message from the language file may be used if not exist. 4. If the message is still not received and the key contains the key '/', use the message from the appropriate messages file (probably irrelevant, as such calls to messages are used in either explicit {{int:message/lang}} calls, or the view of pages from the MediaWiki namespace, not in Special:Upload or everything). 5. If the message is still not received (which means it was not in any language file, even the English one, and not an extension message - which means a custom message, which is probably not the case here), try to use the default English message in the DB. Useful for links like the Village Pump in the sidebar, but probably irrelevant for this.
Step 4 confused me...
On 26/03/2008, Jon Harald Søby jhsoby@gmail.com wrote:
So we have the following cases:
en: the global fallback language xx: any fallback language. All languages can have one, except for English. AA: the language of a wiki BB: a language set in a user's settings CC: a language set by ?uselang=
[...]
Case 3: If a different language is set by ?uselang=
CC CC-xx en
So, based on Rotem's description above
CC - MediaWiki: subpage CC - MessagesCC.php CC-xx - MessagesCC-xx.php en - MessagesEn.php en - MediaWiki: page (according to Brion from bug 1495, but you only get to here for real custom messages, made up)
For MediaWiki:message/yy, I believe that is the same, but I have not tested it. Also, I believe there is a bug about this, for cases 2 and 3, that it should fall back to AA instead of en. I don't know its number though.
I agree it should probably try AA before en, but I just searched and could not find a bug for this. Maybe someone else could also search? If someone else also can't find it then I will be happy to open a new one...
thanks Brianna
mediawiki-i18n@lists.wikimedia.org