Gender
As of version 1.15, MediaWiki supports, in addition to {{PLURAL:}} and {{GRAMMAR:}}, a new magic word: {{GENDER:}}. It is a part a bigger i18n improvement which aims to make MediaWiki fully gender aware in every aspect to address users correctly.
In other words, we have currently two new features for gender.
- Users can set their preferred gender in their preferences.
- Magic word for specifying alternative wordings for each gender.
Usage of gender preference has/will become more widespread with MediaWiki 1.18 (user namespaces: see below), 1.19 (e.g. logs and lists) and 1.25 (more logs).
User preference
Currently there are three options: unknown (called "unspecified" in user interface), male and female. Of these the unknown is the default for all existing and new users. In the future this feature may be (ab)used to add a so called polite gender, but this is still up for discussion.
Magic word
The magic word {{GENDER:}} works very similar to {{PLURAL:}} and {{GRAMMAR:}}. See the following examples for its syntax. Those assume two genders and a gender-neutral option, which can change in the future – possibly in language dependent ways. In principle it is configurable per language but we might have other genders such as "neuter" as additional parameters.
0. {{GENDER:Username|text for unspecified}} 1. {{GENDER:Username|male text|female text|text for unspecified}} 2. {{GENDER:|male text|female text|text for unspecified}} 3. {{GENDER:[INVALID]|male text|female text|text for unspecified}}
Any invalid or non-existent user name will return the default user gender on this wiki – this may be used when the revision user is hidden.
Examples:
Gender of Nike is {{GENDER:Nike|male|female|unknown}}.
→ Gender of Nike is male.Gender of Nike is {{GENDER:Nike|male|female}}.
→ Gender of Nike is male.Default user gender on this wiki is {{GENDER:[INVALID]|male|female|unknown}}.
→ Default user gender on this wiki is unknown.Default is {{GENDER:[INVALID]|male|female}} if unknown is not defined.
→ Default is male if unknown is not defined.
If the third parameter is omitted, it will default to the first (male) form. This behaviour can be changed.
The magic word can be used in content and in interface messages, where (any) username is given in a parameter as-is.
In the second feature of the magic word (example 2 above), for interface messages only, the magic word isn't passed any username and uses the gender preference of the current user. Because of the many ways messages are handled in MediaWiki, this works in messages where plural and grammar work, and it may work or not in others, but gender is needed in many other messages where those are not used. Please report in which messages you (want to) use gender functionality but you can't: see instructions below.
Gender use cases
An example from one of the logentry-* messages: logentry-delete-delete ("$1 {{GENDER:$2|deleted}} page $3")
- It's defined in English as "$1 {{GENDER:$2|deleted}} page $3", which will render e.g. as:
- Nike deleted page Gender
- Sumanah deleted page Gender
- The same message is defined in Polish as "$1 {{GENDER:$2|usunął|usunęła}} stronę $3":
- Nike usunął stronę Gender
- Sumanah usunęła stronę Gender
- In your language (rendered automatically):
- Nike deleted page Gender
- Sumanah deleted page Gender
Another example, for the second usage, is cant-block-while-blocked ("You cannot block other users while you are blocked.").
- It's defined in English as "You cannot block other users while you are blocked."
- It's translated in French as "Vous ne pouvez pas bloquer d’autres utilisateurs tant que vous êtes bloqué{{GENDER:||e|(e)}}."
See more raw examples from core and extensions if you're really curious.
How to use the magic word in translations
- This is documentation for translators. For developers: mw:Localisation#Users have grammatical genders.
You'll notice if a message supports gender because the English text will have some part of it wrapped like this: {{GENDER:$1|text for unspecified}}
. You'll be able to use the magic word, passing it the username of the relevant user with the numbered parameter.
If the translation is gender-dependent, put the part or the parts of the message which need to change within the magic word, as in the example above: {{GENDER:$1|text for male|text for female|text for unspecified}}
.
Because most users won't have specified their gender in the preferences and we don't want force them to either, be careful that the translation is as grammatically correct, natural and not offensive as possible for users of any gender (and sensibility), who'll see the text for "unspecified".
Also, for the same reason and for additional clarity and ease of adding correct translations, it's better to explicitly use the text for unspecified gender, because it's not semantically correct to assume that MediaWiki will always default to the "text for male", even if it currently does (in general and for your language).
If gender is mandatory, and you don't need it, just use a single dummy value as in the English default.
Testing and more examples
- Your gender is
{{GENDER:|male|female|unknown}}
→ unknown (should be unknown. This feature does not work in page content. Should it? Put your comments on talk. ) - Gender of Nike is
{{GENDER:Nike|male|female|unknown}}
→ male. - Gender of Siebrand is male.
- Gender of GerardM is male.
- Gender of Sumanah is female.
- Gender of User:Sumanah is female. (working correctly with the
User:
namespace) - Gender of User_talk:Sumanah is unknown. (still not working for associated
User_talk:
pages, whose gender is still "neutral/unknown") - Gender of User:Sumanah is unknown. (not working when link syntax is included)
- Gender of Template:Sumanah is unknown. (working correctly with the
Template:
namespace, whose gender should be the default gender for.
on the current wiki) - Gender of IAlex is unknown.
- Gender of Duesentrieb is unknown.
- Gender of Glavkos is male.
In other languages (check source to see what's the input):
- [cs] čeština (Czech): Utar je pohlaví mužského.
- [dsb] dolnoserbski (Lower Sorbian): Rod Michawiki jo muskecy.
- [fr] français (French): Le genre de Sumanah est féminin.
- [gsw] Alemannisch (Alemannic): S Gschlächt vum Nike isch He edits wiki pages, S Gschlächt vum Siebrand isch He edits wiki pages, S Gschlächt vu Purodha isch When mentioning you, the software will use gender neutral words whenever possible.
- [he] עברית (Hebrew):
- המשתמש/ת HebrewFemale לא ציין/ציינה את פרטי המגדר שלהם.
- המשתמש HebrewMale הוא גבר.
- המשתמש/ת HebrewUnspecified לא ציין/ציינה את פרטי המגדר שלהם.
- [ksh] Ripoarisch (Colognian): Uns Medmaacher Femina es Wann övver Desch jeschwahdt weed, dann der ohne dorschblecke ze lohße, ov de ene Kääl udder e Weesch bes, esu wi: „dä Metmaacher Su-wi-De-heijß schrihv em Wiki met.“, Siebrand: es ene Dä Su-wi-De-heiß schriiv och em Wiki met., wat Purodha es Wann övver Desch jeschwahdt weed, dann der ohne dorschblecke ze lohße, ov de ene Kääl udder e Weesch bes, esu wi: „dä Metmaacher Su-wi-De-heijß schrihv em Wiki met.“, un !!FUZZY!!? Wann övver Desch jeschwahdt weed, dann der ohne dorschblecke ze lohße, ov de ene Kääl udder e Weesch bes, esu wi: „dä Metmaacher Su-wi-De-heijß schrihv em Wiki met.“.
- [hsb] hornjoserbsce (Upper Sorbian): Splah Michawiki je muski.
- [sr] српски / srpski (Serbian): Rancher је мушко.
- [te] తెలుగు (Telugu): వీవెన్ ఎవరో తెలియదు. మీరు ఎవరో తెలియదు ('ఎవరో తెలియదు' అని రావాలి. పేజీలో ఈ సౌలభ్యం పనిచేయదు.)
Gender in languages
![](/https/translatewiki.net/images/thumb/3/3a/No%2C_are_you%3F.jpg/300px-No%2C_are_you%3F.jpg)
Info: wikipedia:T-V distinction and wikipedia:Grammatical gender.
This section describes characteristics of various languages which are relevant to the use of GENDER. Most of them should be already covered by the current implementation. If you find a message which doesn't have GENDER in the source but needs to know the gender of the user to be correctly translated (i.e. a gender-neutral translation wouldn't be natural/correct), please file a bug or ask for it at Support; the same if your language needs the user and user talk namespace names to respect gender (which is defined elsewhere).
Languages which need more features to correctly address users (not necessarily gender-related) are in the "Unsupported" section: if this applies to your language too, please add or move it to that section and describe its issues and what you'd need for the interface to be correct.
Supported
Note that names of genders are already available for translation in mediawiki messages group as gender-*
messages.
- [ast] asturianu (Asturian): Has 3 grammatical gender, of which 2 apply to users. It also has T-V distinction, but the consensus in the Asturian team is to use only the less formal variant in translations. Current gender implementation seems to work fine.
- [be] беларуская (Belarusian): 2 T-V distinctions, 3 grammatical genders, 2 of which apply to users. Base application is same as for Czech. Also phrases like Dear, XYZ!.
- [br] brezhoneg (Breton): has grammatical gender.
- [ca] català (Catalan): T-V distinctions: they are disappearing in common language but they are used in computer language, however the rules are simple and don't need any programming gadget. Grammatical gender: two genders male-female which affect most adjectives.
- [cs] čeština (Czech): has grammatical gender. Almost every message which is in past tense is gender-dependent. It also has T-V distinction in second-person singular, but translations use only one variant (usually the more formal one).
- [cy] Cymraeg (Welsh): Welsh has two genders, masculine and feminine. Gramatically, using gender at all would lead to very many knock-on effects in text, mainly because of gender distinctions in mutations. Because of this, it is quite common in texts to adopt the convention that the male gender is used throughout, and refers to both male and female. I do not anticipate that we will use GENDER very much at all, since the simple option of not using it is acceptable. However, I have applied it to the Babel boxes, since the result is more elegant than before. 2 T-V distinctions, currently (2012) interface uses formal address. Some users would appreciate having an option to choose an informal address mode.
- [de] Deutsch (German): 2 T-V distinctions, 3 grammatical genders, 2 of which apply to users. While it is comparatively easy and common to avoid gender dependencies when addressing users or talking about users, T-V distinctions are an issue. They are already taken care of by a separate 'polite form' localization of
de
, however. - [el] Ελληνικά (Greek): 2 T-V distinctions, 3 grammatical genders (feminine, masculine and neutral), 2 of which apply to users.
- [es] español (Spanish): has grammatical gender.
- [fi] suomi (Finnish): no grammatical gender, few lexical differences, t-v.
- [fr] français (French): has two grammatical genders (masculine, feminine, there's no neutral in French) both of which apply to users or things, both either singular or plural (indeterminate gender becomes masculine, but a bot, robot in French, is determinately masculine). Applies to adjectives and transitive verb participles :
- most often for the passive form with the auxiliary verb être, including reflexive verbs, (in which case it will match the gender and number of the subject) like in « Jean a été bloqué » vs. « Jeanne a été bloquée »), or « Jean s’est déconnecté » vs. « Jeanne s’est déconnectée »,
- or for the past participles of transitive verbs in compound times conjugated with the auxiliary verb avoir when the participle occurs after the direct object (in which case it must match the gender and number of the direct object complement)
- or for refering again to a subject of a second verb using a pronoun (« il vs. elle », or « ils vs. elles », like in English « he vs. she »), or in a circumstantial complement (« pour lui vs. pour elle », like in English « for him vs. for her. »). However some pronouns are not always marking the gender differently with some grammatical cases (e.g. se or s’, lui, le or l’...), and the gender is marked differently in possessive determinants whose effective gender (son vs. sa) depends on the determined noun (but not on the possessor as in English his vs. her).
- [gsw] Alemannisch (Alemannic): 3 T-V distinctions, 3 grammatical genders, 3 of which may apply to users. Like in Southern German, gender is relevant for user names. They require a definitive article which inflects for gender. For example, a message like "(username) sleeps" should be translated as "der (username) schlaft" if the user is male, "d (username) schlaft" if female, and "ds (username) schlaft" if neuter. So far it has been translated as "(username) tuet" but this is not the grammatically correct form. For Alemannic gender will be a great progress.
- [gv] Gaelg (Manx): two grammatical genders, M and F. As noted for Welsh above, this is a complex issue because gender involves mutations to following words. It is only likely to arise in contexts where a username is shown, as with general terms like "user" we tend to use the "gender-neutral" forms, which are grammatically masculine. Verbs forms etc. are not affected.
- [hr] hrvatski (Croatian): Has 3 grammatical gender, of which 2 apply to users.
- [hu] magyar (Hungarian): no grammatical gender
- [ia] interlingua (Interlingua): No grammatical gender. Two personal genders, used as in English (he=ille, she=illa, him=le, her=la). There is a T-V distinction (tu/vos) but we've chosen to adress the users informally using the T-form in this Interlingua translation.
- [it] italiano (Italian): has 2+1 T-V distinctions, plus some variations of them; 2 grammar genders, more or less as In French; many other variations are given by the vast possibilities to use infinitive and impersonal forms in many messages, with no t-v or gender, but no need for software solutions, just some work to make them consistent.
- [ja] 日本語 (Japanese): Has no grammatical gender. Although there exist a few pairs of words that emphasise gender, gender-neutral expressions are preferred in general and particularily in software messages. (ex. その人 the person is preferred over 彼 and 彼女, which translate to he and she)
- [jbo] la .lojban. (Lojban): No grammatical gender.
- [pl] polski (Polish): has grammatical gender (working list of messages with {{GENDER}})
- [pt] português (Portuguese): both grammatical gender and T-V distinction.
- [ru] русский (Russian): 2 T-V distinctions, 3 grammatical genders, 2 of which apply to users. Base application is same as for Czech. Also phrases like Dear, XYZ!
- [su] Sunda (Sundanese): no grammatical gender, no difference at all.
- [sv] svenska (Swedish): T-V distinctions is generally not used anymore. 2 grammatical genders, but only 1 apply to users. Difference between feminine and masculine is only present in personal and possesive pronouns.
- [uk] українська (Ukrainian) has grammatical gender.
- [zh] 中文 (Chinese): Has no grammatical gender. Although there exist a few pairs of words that emphasise gender, gender-neutral expressions are preferred in general and particularily in software messages.
Unsupported
- [nn] norsk nynorsk (Norwegian Nynorsk): got feminine, masculinum and neuter.
If the GENDER-thingy only points to user names, it should be useless for this language, AFAIK.--Harald Khan Ճ 17:57, 28 January 2009 (UTC)
- Users are the only thing we know the gender of, or what do you mean? – Nike 18:25, 28 January 2009 (UTC)
- I was thinking of inflection with regards to the genders of words. Som variables in messages could possible have different genders. --Harald Khan Ճ 18:31, 28 January 2009 (UTC)
- Which most often are user supplied input, and thus we cannot know the gender. If there however is preset list of items, something could be done to it. – Nike 18:49, 28 January 2009 (UTC)
- I was thinking of inflection with regards to the genders of words. Som variables in messages could possible have different genders. --Harald Khan Ճ 18:31, 28 January 2009 (UTC)
- [sw] Kiswahili (Swahili): Swahili does not distinguish between masculine and feminine. However, there is a grammatical distinction between 10 different 'classes' of noun. One class includes 'people' and another class includes 'things', which would include bots. Grammatically, the class of a noun determines the agreements of demonstrative pronouns and verbs in a sentence. There is a subject prefix and an object infix in a Swahili verb which varies according to noun class. Usually it does not matter how we refer to bots, since a bot cannot take offence! However, it would be a nice feature to have a 'bot' 'gender' in the log entries, which could be used for bot usernames. For example, Blocklogentry ("blocked [[$1]] with an expiration time of $2 $3"), using two usernames, would read (meaning 'blocked $1'):
- 'amemzuia $1' for a sysop who was a real person and a blocked user who was a real person
- 'imemzuia $1' for a bot sysop (I know this can't be but a bot could do actions to other users in other logs) and a blocked user who was a real person
- 'ameizuia $1' for a sysop who was a real person and a blocked bot user
- 'imeizuia $1' for a bot sysop and a blocked bot user.
- However, since there is a real person behind every bot, this is a very low priority feature. At present all users are referred to as if they were real people. If there were a lot of other languages which had a similar issue and an additional 'bot' gender were added in the future, then we would consider using this in Swahili, which is why I am mentioning this.
- [ksh] Ripoarisch (Colognian): has 2 T-V distinctions, and, from a programmers point of view, 4+1 grammatical genders (2 female, 1 male, 1 neuter, +unknown), neuter usually not applicable to human users, but e.g. to bots having a neuter denomination. Common addressing patterns suggest to add T-V distinctions as additonal 'genders', which would imho definitely increase acceptance and reputability of the software. Feminine, masculine and neuter grammatical genders, plus the unknown gender, plus a peculiarity: Usually, female persons are talked about in the neuter declension, except occasionally in the female declension. These exceptions depend on role, social status, age, relation between speaker and the person spoken about and/or listeners, family situation, existing or nonexisting lingual ambiguties. Nicks comprising language words are usually declensed according to their grammatical gender, not the natural gender of the user behind them. Thus, we have these classes that users need to assign themselves to:
- Masculine – As per masculine nick or the natural gender.
- Female talked about as neuter – As per natural gender of a standard female or some feminine nick.
- Unknown gender – Standard and default.
- Female talked about as feminine – As per feminine nick or the natural gender of a specialcased female.
- Neuter – As per neuter nick or the natural gender, e.g. of a bot program.