Not sure if i understand, even though we have genres in german, too. But maybe you mean something different. In german every noun has what we call "gender": like "table" is masculine, "door" is feminine and "cable" is neuter.
Couldn’t you use a simple mapping like:
0 => masculine,
1 => feminine,
3 => neuter,
If i got you wrong, maybe you can explain the context where you need this?
echo Yii::t( 'contacts', '0#{friend} has been invited as a contact|1#{friend} has been invited as a contact',
array(
($friend->Profile->sex === 'male') ? 1 : 0,
'{friend}' => $friend->Profile->displayName) );
In english, invited is both neutral. But in spanish, you have "invitado" for males, and "invitada" for females.
The problem is if you need both "gender" and counts.