Template talk:GetFallback

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

vec -> it

[edit]

Hi, can you please add a fallback vec -> it in Template:GetFallback / Template:GetFallback2 (by the way, what's the difference between them?). Thanks, Candalua (talk) 19:01, 15 August 2009 (UTC)[reply]

✓ Done. The differences between them is that some languages have two fallbacks, not only one. The first fallback of Low German (nds) is Dutch Low Saxon (nds-nl), and the second is German (de). Brasilian Portuguese (pt-br), for example, has only one fallback, which is Portuguese (pt). --The Evil IP address (talk) 10:45, 16 August 2009 (UTC)[reply]

de fallbacks

[edit]

Could you please add DE as fallback for ger deu gmh goh gct bar cim geh sli ltz vmf mhn pfl pdc swg uln sxu wae wep?[1] I think it works as secondary fallback for Polish, too.[2] TIA Paradoctor (talk) 05:12, 11 January 2010 (UTC)[reply]

fr fallbacks

[edit]

All regional languages of France exclusively should all have a fallback to fr=French (because French is the only official language recognized everywhere they are spoken, and all speakers of these regional languages should be bilingual in French which is even their primary language now): br=Breton, co=Corsican, frp=Arpitan (Franco-Provençal), ty=Tahitian.

French creoles should also propose French as the default, notably : ht=Haitian (and possibly other French Antillan creoles spoken in Guadeloupe ou Martinique). So you should add:

 |br|co|frp|ht|ty=fr

There are other major regional languages in France but they are used across French borders international so the choice of the fallback language is not decidable : eu=Basque, gsw=Allemanic (named "Alsatian" in France), oc=Occitan ; as well as (in very small border areas) : ca=Catalan, it=Italian. The same is true for other Polynesian languages, for Comoran spoken in Mayotte, or possibly for aboriginal languages spoken in French Guyana (if they are specific to that region and not international).

There's also the Gallo language (recognized by the Region of Britanny only as a cultural language with some support in education, but not as an official language usable in courts for example). However, it still doesn't have any specific ISO 639-3 code (despite it is very different from French, even if it's still an Oïl Language like French, this is definitely not categorizeable as French, and this can't be specified using a variant subcode within 'fr'). But if it had a code (and if the language was supported in Wikimedia), it should also have French as a non ambiguous fallback.

The same is true for Norman (but it is international and spoken officially in Jersey and Guernsey, where English is co-official and French actually not spoken ; in those areas the regional languages of these islands are treated as minor dialectal variants). So Norman can't be mapped as well with valid fallbacks (ambiguity between French and English, even if the default in Commons is to choose English when there's no specific mapping : it is safe, because there are far more speakers on Norman today in the Channel Islands than in Continental Normandy in France).

verdy_p (talk)

I have added what you proposed. "mg" was already there as fallback to French. --The Evil IP address (talk) 11:07, 25 August 2010 (UTC)[reply]
I'm not sure that lots of Malasy speakers in Madagascar understand French, though this is still the most common secondary language understood there, where written litteracy is still low, Internet is still not very developed in this country; the Malagasy community abroad has a much better litteracy, in various languages; yes there are Malasay speakers in French regions nearby (notably in Reunion and Mayotte, some in France), but there are many others also in other countries (India, South Africa) where English is also spoken.
There's not a clear choice of "best" fallback language for this, given that the Malagasy reading community is still very small (the number of contributers is reduced, but the fallbacks should first target the number of readers, before writers, as they are only intended to be understood, before a contributor in that language translates the missing page that needs a fallback). verdy_p (talk) 12:12, 18 December 2011 (UTC)[reply]

{{Editprotected}} Please add "de" as fallback "frr" and create Mediawiki:lang/frr with content "frr". Merlissimo (talk) 14:09, 22 August 2010 (UTC)[reply]

Done the second. Is the first requested by the actual native users of the wiki? I'm asking, cause perhaps they want 'nds' as their fallback, as 'nds' is the second native language of Northern Frisia while 'de' is only the third native language. --Slomox (talk) 14:32, 22 August 2010 (UTC)[reply]
My experience (as a native speaker of North Frisian frr) is, that de is the second language as well for frr-speakers as for nds-speakers. Many frr-speakers understand nds and some can speak nds, but all frr-speakers understand and speak de as their second language. --Murma174 (talk) 18:11, 22 August 2010 (UTC)[reply]
I have now added "de" as fallback. It's possible to set two fallbacks if necessary, but having German as fallback is better than nothing. --The Evil IP address (talk) 11:08, 25 August 2010 (UTC)[reply]

(ckb, mzn, glk -> fa) & (arz -> ar)

[edit]

{{Editprotected}}

these languages have same script and language.−ebraminiotalk 14:06, 10 January 2011 (UTC)[reply]

✓ Done Mardetanha talk 17:27, 10 January 2011 (UTC)[reply]

Fallbacks to es

[edit]

I’d like to suggest creating a fallback to Castilian (es) for the following languages of Spain: Aragonese (an), Asturian (ast), Basque (eu), Catalan (ca), Extremaduran (ext) and Galician (gl).
| an | ast | eu | ca | ext | gl = es
Wlgrin 08:11, 17 December 2011 (UTC)[reply]

Normally speakers of those languages should suggest these changes. It's not nice to force such changes on a community. --Slomox (talk) 15:00, 17 December 2011 (UTC)[reply]
Is that a policy or a generally agreed principle, by any chance?
Wlgrin 23:16, 17 December 2011 (UTC)[reply]
OK for all these with the exception of Basque (eu) because it is extremely different from Spanish, and spoken/written in two countries (Spain and France). The two Basque areas do not necessarily speak the French or Spanish language on the other side of the Pyrenean international border. You may argue that the Basque speaking community in Spain is more important than in France. But there's now a much better intercomprehension of both communities through English as a secondary lingua franca, rather than through either French or Spanish. Then I would not define this fallback for Basque, so that it would default to English if no actual Basque translation is present.
This does not remove the merits of Spanish or French or Basque, but each community can easily find contributors with English understood at least for reading, and will provide the 3 necessary translations in Basque, French and Spanish faster, if English is presented as the default source rather than Spanish. verdy_p (talk) 12:21, 18 December 2011 (UTC)[reply]
Thank you for sharing your thoughts on this. That was just the kind of thought-provoking rationale that I was hoping to read. I had also read with interest what you had written about Occitan and other languages earlier on this page.
I agree that Basque is not directly related to Spanish (and French) but that fact does not preclude the use of the latter as fallback for the former (in real life and in software). A fallback is not an encyclopædic statement about the nature or relationship of languages, but merely an operational convenience to increase the chances that information will be understood by those who seek to consume it. Indeed, English is not related to most of the languages for which it serves as fallback.
Please forgive me if I missed your point but wouldn't it be odd, also, to choose English as a fallback for Basque on the grounds that it is the foreign language most likely understood by both a Spanish and a French Basque? Is it silly to imagine that Basque is enough for them to communicate?
I find it more natural to consider instead the likelihood that any Basque reader would comfortably understand the fallback language. In the case of Basque, you are right to assume that I had used as premise the fact that over ninety per cent of users who are likely to use Basque as their preferred language are located in Spain and fluent in Castilian. I further surmised that most are not fluent in English and would rather face a page in Castilian than one in English. A fallback to Spanish would fail to serve less than ten (or even five!) per cent of users who would actually prefer French (perhaps even English) over Spanish. But that would probably be better (I thought) than failing to serve 99% who would rather have something other than English (admittedly, an assumption I am boldly making). I am thus arguing (weakly, no doubt!) that Castilian is somewhat “less bad” of a choice than the English default. That is obviously nothing very exciting and that approach remains wholly inadequate for languages that have a more balanced transnational distribution.
One possible alternative is to stop thinking in terms of language and, instead, to think of people and cultural habits. One could distinguish, for example, the community of Basque users who, located in Spain, are also fluent in Castilian (eu-ES) from the community of those who, located in France, are also fluent in French (eu-FR). Each locale would have a different secondary fallback:
{{GetFallback}}
| eu-ES | eu-FR = eu
{{GetFallback2}}
| eu-ES = es
| eu-FR = fr
Obviously, this would require a modification to the list of languages in MediaWiki (to allow users to choose, as preferred language, eu-ES or eu-FR, which are not currently offered), but I don’t see why it could not be done. Similar codes exist for Austrian and Swiss German, though, I imagine, for very different reasons. Indeed, it would have to be made clear that one is not speaking of a language in this case (eu-FR is not the dialect of Basque spoken on the French side) but rather of a locale (cultural conventions predominantly used in a community, such as the secondary language).
While I think that this second approach is the better one, it still fails to address your last point: that presenting a page in English (often, the original version) will increase the chances of having it translated. My intuition in that regard is that it is more beneficial to aim to please readers (the expected majority for whom the site is made) rather than the fewer contributors who, in addition to their likely fluency in English, may be savvy enough to check the English version of the page before starting a translation. With English as fallback, on the other hand, upon encountering too many an English page, a Basque reader who is fluent in Spanish but not English (I am guessing that there are many) might just give up on Basque and choose Spanish as preferred language, and that would be regrettable. In all cases, the ability to easily switch the language of a page or segment (without changing the main preferences) is very valuable.
I am hoping that I am not failing to take into account any prior discussion about this topic that may have already taken place (apologies if that was the case). And I will be grateful for corrections if my numerous assumptions (or logic) are flawed.
Wlgrin 01:24, 19 December 2011 (UTC)[reply]
That would sound sensible, but I have already asked about Catalan fallback at the Catalan Village Pump, and where I got two replies in favor of English and none in favor of Spanish. The Basque case sounds similar.
I do not think we can really should use things like "eu-es" unless it get supported by MediaWiki - which could impose a substantial maintenance burden. A possibly more appealing solution could be customizable fallback, but I have not idea on how it could be implemented.--Zolo (talk) 20:40, 20 December 2011 (UTC)[reply]
Many thanks for chiming in. When you speak of a maintenance burden, are you thinking of the potential need to keep two Basque versions in sync? I was thinking that content translated into Basque would still be tagged as “eu” (not “eu-es” or “eu-fr”), so that there would be only one instance of it. The “eu-es” or “eu-fr” would be used only in user preferences, and therefore would always fall back (as first choice, using {{GetFallback}}, to “eu”, and then, using {{GetFallback2}}, to different languages as second choice). No change would need to be made to existing “eu” pages. I can think of only one potential problem (but my understanding of MediaWiki is very limited), occurring if the list of languages stored in MediaWiki (in “languages/names.php”, I think) is used for language-specific activities that are incompatible with the concept of a locale. For example, if a content translation extension uses the list to display the list of target languages, only real languages should be listed, not locales. One solution would be to have a bi-dimensional array, with the second field specifying whether the entry is a language or just a locale; or one could have two lists: one for languages (the current list), and a list of locales; “eu” would appear in the former, “eu-es” and “eu-fr” in the latter. Content would have to be associated to a language, but users would choose, in their preferences, a locale (which would, in turn, be associated to a primary language). It would probably be useful, then, to create a new magic word for it so that {{int:Lang}} continues to return the primary language for the sake of backward compatibility. Templates like {{Getfallback}} could then use the new {{int:Locale}} (or such) magic word. But all of that is (I believe) very easy to implement.
I agree that customisable fallback (each user specifying the fallback chain of his choice) is even better (the ideal solution, I’d venture). But that would require, I suspect, much more work: not only a more complex user interface in preferences, but also perhaps custom PHP code to perform the fallback selection and page retrieval (as opposed to the current technique, which relies on templates). I’m thinking that caching could be adversely affected if the final page depended on a fallback chain that had a very large number of possible combinations. That’s only a rough intuition, though; I do not know the MediaWiki software. Certainly, it’s an avenue that is worth exploring for the longer term.
Also, thank you for sharing your experience at the Catalan village pump. I think that the answers that you received illustrate the need for clarifying the role of fallback. The first argues that not all Catalan speakers are fluent in Spanish (though “some” are, to quote a fine example of an understatement!). Unfortunately, it fails to highlight that not all Catalan speakers are fluent in English either (as you had suggested in your follow-up). Probably 95% of people using Catalan every day are equally fluent in Castilian; perhaps 25% can understand English and fewer yet will be comfortable reading it. The second answer argues that “it's not a matter of quantity, but principles” and that “English is (…) neutral and nobody understand it as a politicaly-biased choosing”. Even if the political argument was considered relevant (and I believe that it should not), one should note that Castilian too is an official language of Catalonia (and of the Valencian Community, and of the Balearic Islands). Arguably then, rejecting Castilian in favour of a completely foreign language such as English is, de facto, a statement of exclusionary policy rather than the opposite! But, frankly, the real concern is that it makes the site less accessible to Catalan speakers themselves. The fallback mechanism is simply a convenience designed to pragmatically serve the majority of users, reflecting their actual behaviour and habits in daily life. People do not speak English in Catalonia, except to address foreign tourists. To quote one Valencian user on the Moodle web site: “Really I would prefer any spanish page (even if it uses "agarrar" instead of "coger", I am not offended by that) than the english page.” The “ca” to “es” fallback is not a novelty in software either. That being said, I would like to note that having locales (as discussed earlier for Basque) would provide a way to satisfy even the separatist crowd (for example, one could have “ca-es” that would first fall back to “ca” and then to “es”, while “ca” could just fall back to “en”). I think that, in the short term, it is the cheapest way to keep everybody happy.
It would also be nice to have (until we get customisable fallback or, at least, locales) some consensus on the purpose of the fallback mechanism and the criteria for choosing its setup which, I think, should be tailored to serve the majority of users. Everyone could then spend their energy translating pages into the language they love.
Wlgrin 09:21, 22 December 2011 (UTC)[reply]
Sorry for late reply. Actually I am not sure about maintenance problems, but I think that supported languages are added to some MediaWiki code, so that for instance {{#language:en-gb | {{int:lang}} }} gives "British English". I suspect the list of languages is used for some maintenance task (maybe to list languages with incomplete interface translations). It may thus be confusing to add languages codes like "eu-es" that do not have any linguistic meaning (at least unless there are differences between eu-es and eu-fr).
I agree that Spanish sounds better than English for some languages, but native speakers should have their say. You can try to raise the question on local Wikipedias if you want more extensive feedback. --Zolo (talk) 08:20, 3 January 2012 (UTC)[reply]

be-x-old → be-tarask

[edit]

{{Editprotected}} Guys, can you add a mapping from be-x-old (fallback) to be-tarask (real)? Wizardist (talk) 23:18, 6 January 2012 (UTC)[reply]

 Comment the corresponding Wikipedia is be-x-old, so shouldn't it be the other way round ?--Zolo (talk) 07:49, 7 January 2012 (UTC)[reply]
Nope, be-x-old was and still is a mistake of LangCom. The main language code (and the official one) is be-tarask, so there is no mistake in my request. Wizardist (talk) 15:43, 7 January 2012 (UTC)[reply]
Okay. I have added both anyway. That is better for the end user. Should they fall back to "be" in {{GetFallback2}} ? --Zolo (talk) 10:30, 8 January 2012 (UTC)[reply]
Thank you, but be-tarask → be-x-old conversion should not be performed as no messages are stored under this code at all. Concerning your answer, formally, yes, they should fallback to be, but actually in the very most cases there is a translation for be-tarask and no translation for be. Moreover, if I detect an untranslated message, I try to translate it ASAP. If it would be fallbacked to be, then I may just don't detect a lack of translation. :) Wizardist (talk) 00:01, 10 January 2012 (UTC)[reply]
Fallback is not just used for translatewiki messages, it is also used for templates like {{LangSwitch}}, which makes it more likely that some files will have be description and not be-tarask (and the other way round, should also be default to be-tarask ?).
If be-x-old is not used at all, would there be a way to remove it from the list of supported languages ? I dont know where it is stored but we have both be-x-old and be-tarask in user preferencee and twice be-tarask in anonymous language selector. --Zolo (talk) 11:32, 10 January 2012 (UTC)[reply]
Removing be-x-old from the list is an issue of bugzilla:9823. Wizardist (talk) 19:58, 10 January 2012 (UTC)[reply]
I think it should work properly now that we have MediaWiki talk:Lang/be-x-old. Per user talk:Zolo, it sounds better to wait until bugzilla:9823 before removing be-x-old.— Preceding unsigned comment added by Zolo (talk • contribs) 20:40, 29 January 2012 (UTC)[reply]

MediaWiki:Lang/be-x-old

[edit]

There is a question at MediaWiki talk:Lang/be-x-old

Can be-tarask be stored here? Or should we rely on fallback retrieving mechanism? Wizardist (talk) 23:06, 17 January 2012 (UTC)

I don't know the answer, but since it clearly relates to the discussion above, I copy the question here. Rd232 (talk) 19:40, 29 January 2012 (UTC)[reply]

OK, so the answer (per above) seems to be to leave that as it is (MediaWiki:Lang/be-x-old = be-x-old) until Bugzilla:9823 is resolved. On a related note, it might be helpful to have a bot do a survey of just how widely be-x-old is used (in templates, template subpages, MediaWiki messages etc). Rd232 (talk) 02:11, 30 January 2012 (UTC)[reply]
I dont have exhaustive statistics but we have about 400 uses of {{Be-x-old}}, against ca 4300 {{Be-tarask}} (4700-400 redirects). A bot could probably fix them if we want to make things cleaner. We also have many "be-x-old" in internationalization templates using {{LangSwitch}} (eg Category:Multilingual tags or the name parameter of creator templates). Since such templates are most often created using Wikipedia links, and use the "be-x-old" Wikiipedia prefix. A bot could change them, but such templates are still being created so it would not be very maintainable-Zolo (talk) 09:48, 30 January 2012 (UTC)[reply]

Remove be-tarask → be-x-old

[edit]

{{Editprotected}} Please remove this. As long as be-x-old is deprecated and is not used by MediaWiki itself (it makes a hard switch to be-tarask even with ?uselang0, it's better to remove this line. For example, in be-tarask locale "Translate this" on a gadgets list page lead to ".../be-x-old" pages, and it's wrong. Wizardist (talk) 21:41, 14 August 2013 (UTC)[reply]

✓ Done After three month without any response I am applying it. Please {{Editprotected}} again if this was not okay. −ebraminiotalk 22:03, 4 November 2013 (UTC)[reply]

Norwegian fallbacks

[edit]

When selecting Norwegian bokmal or Norwegian nynorsk with the Languages selector, most often the translation resources are not found under "nb" or "nn" and there's a clear lack of fallback to "no" (generic Norwegian) that contains most translations. Otherwise we just get English text (for example with {{Label}} used to render lot of place names).

Please map |nb|nn=no |no=nb (the second case is for the recommended substitution for the most common bokmal variant).

For the second fallback, you should also use |nb|no=nn |nn=nb.

verdy_p (talk) 12:58, 9 October 2016 (UTC)[reply]

Possible bug detected in #SWITCH statement?

[edit]

For each of the language lines the target language code should be repeated to the left of the = sign:

| als | bar | de-formal | de-at | de-ch | frr | ksh = de

should be:

| de | als | bar | de-formal | de-at | de-ch | frr | ksh = de

Otherwise all "native" target languages will result in default English... Geert Van Pamel (talk) 19:09, 15 September 2021 (UTC)[reply]