A simple component to add more genders. This will add a 3rd gender called others. You may add more genders in array by editing a file components/MoreGenders/ossn_com.php For example in case you wanted to add 4th Gender
'options' => array(
'male' => ossn_print('male'),
'female' => ossn_print('female'),
'other' => 'Other',
'fourth_gender' => '4th Gender',
)
.
Can I somehow make the gender visible in profile?
Maybe beside the profile picture?
Maybe like this?
I really forgot the ossn_print, Arsalan already mentioned
Thank you!
Yes, because ossn_print() is missing in your options array.
Each language file comes with one or more pairs of
'a_unique_identifier' => 'a_translation',
For example
'gelb_und_blau_gemischt' => 'grün',
in ossn.de.php and
'gelb_und_blau_gemischt' => 'green',
in ossn.en.php
Simply pass that identifier to the ossn_print function like
ossn_print('gelb_und_blau_gemischt');
and depending on the chosen language (German or English) of the member, ossn_print will search for that identifier and automatically display the corresponding translation grün
or green
.
If there's no language file available for a chosen language then ossn_print would display the given identifier gelb_und_blau_gemischt
in the ossn_com.php from MoreGender I added this:
in ossn_en.php I added this:
but it is not translated:
i will try, thanks
All translations strings need to be done via ossn_print()
You need to add translations in each file example ossn.de.php
https://github.com/opensource-socialnetwork/opensource-socialnetwork/blob/master/locale/ossn.de.php#LL40C1-L41C28
Example ossn.de.php for
ossn_register_languages('de', array(
'male' => 'männlich',
'female' => 'weiblich',
'other' => 'Other',
' fourthgender' => 'Forth Translation',
));
I mentioend this in my previous reply too, ossn.en.php
ossn_register_languages('en', array(
'weiblich' => 'Something',
'nonbinary' => 'Translation',
'other' => 'Other',
'unsure' => 'Unsure',
));
How exactly do i have to do it?
how is the ossn_print recognizing the langauge selected by user?
This component already support translation
'options' => array(
'male' => ossn_print('male'),
'female' => ossn_print('female'),
'other' => ossn_print('other')
'fourth_gender' => ossn_print('fourthgender')
)
I need help to implement locale file for translation
So you’ll fix the extended member component?
Or do I just have to add you code to the locale file from extended member?