Gender in the language files

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
rivaldo
Registered User
Posts: 269
Joined: Wed Feb 23, 2005 1:05 am

Re: Gender in the language files

Post by rivaldo »

APTX wrote: viewtopic.php?f=4&t=17036&p=106305&hilit=gender#p106305
I thought I suggested that... but now when I re-read that I don't think if the replies were to my suggestion or to the thread starters suggestion.
Your suggestion and the (Jan 2005) thread starter's suggestion sound very similar to me, while your suggestion and the (July 2006) thread starter's suggestion definitely sound the same.

User avatar
dhn
Registered User
Posts: 1518
Joined: Wed Jul 04, 2001 8:10 am
Location: Around the corner
Contact:

Re: Gender in the language files

Post by dhn »

The developers are currently evaluating whether language constructs like different plurals - some countries like Poland have more than one plural form - are possible without major restructuring of the language files. Gender-dependent verbs were not yet discussed but may be considered. Though I doubt that this is going to happen without a standard gender selection included in phpBB 3.0.

code reader
Registered User
Posts: 653
Joined: Wed Sep 21, 2005 3:01 pm

Re: Gender in the language files

Post by code reader »

i agree that standard gender selection would be required, but the actual change to the code (or rather language files: no need to change the code itself) is laughably easy.
when olympus gets around to interpret the language file, the user object already exists and initilized. moreover, the $lang variable is actually a member of the user object.
let's assume you have a fiels like this:
$user->data['user_gender'] that can be either 'male', 'female', 'unknown' or undefined.
in this case, the translators for a gender-sensitive language will be able to do something like this:

Code: Select all

// currently, language files looks so:
$lang = array_merge($lang, array(
	'KEY_1'	=> 'value 1',
	'KEY_2'			=> 'value 2',
.......

// in a gender-sensitive language, the appropriate strings will look like this:
$lang = array_merge($lang, array(
	'GENDER_SENSITIVE_KEY_1'	=> $this->data['user_gender'] == 'female' ? 'female string' : 'male string',
	'KEY_2'			=> 'value 2',
....

// for clarity and brevity, you can add at the beginning of each language file the following:
$male = $this->data['user_gender'] == 'male';
$female = $this->data['user_gender'] == 'female';

// and then, the actual string will look so:
$lang = array_merge($lang, array(
	'GENDER_SENSITIVE_KEY_1'	=> $female ? 'female string' : $male ? 'male string' : 'neuter string',
....
the only thing the devs have to do in order to facilitate this is add the user_gender field. the rest of the work is for the translators.

Lieutenant Clone
Registered User
Posts: 161
Joined: Tue Feb 28, 2006 6:13 pm

Re: Gender in the language files

Post by Lieutenant Clone »

*starts slow clap*

I like it code reader. :D
I had a couple Ideas but they were admittedly more complicated. You are very right this would be easy to mod, but it would be nice to have it built in, so that all the regular language files would support it.

I can see how annoying that would get in spanish with so many gender specfic words.
Dennis Robinson
Image

DragonlordP
Registered User
Posts: 180
Joined: Sun Nov 16, 2003 10:51 am

Re: Gender in the language files

Post by DragonlordP »

Lieutenant Clone wrote: You are very right this would be easy to mod, but it would be nice to have it built in, so that all the regular language files would support it.

+1111 (for many other occassions as well), Acyd Burn I hope you're reading :)
you live it or lie it

http://www.electricrequiem.com" target="_blank
greek metal forums and more

AlleyKat
Registered User
Posts: 57
Joined: Thu Aug 28, 2003 2:43 am

Re: Gender in the language files

Post by AlleyKat »

Regarding the language selection, are the language names i18n in phpbb3?
"This is the place where the sun don't shine"

Lieutenant Clone
Registered User
Posts: 161
Joined: Tue Feb 28, 2006 6:13 pm

Re: Gender in the language files

Post by Lieutenant Clone »

I belive so. I read something about it earlier but I cant remember for sure.
Dennis Robinson
Image

AlleyKat
Registered User
Posts: 57
Joined: Thu Aug 28, 2003 2:43 am

Re: Gender in the language files

Post by AlleyKat »

Ok. Would be nice if one of the teammembers would take a second and descend to the level of us normal mortals and answer with a simple yes or no.
"This is the place where the sun don't shine"

Post Reply