localization - Translate open graph Facebook API with gender variations -


i'm trying translate custom open graph action.

the problem in portuguese variation in sentence according "gender" of object in question. looked in documentation , saw can translate differently according "gender", did not find how tell gender of object facebook.

i tried in various ways, creating field in object, sending information without field, none of ways facebook api identified, entering condition if gender had not been informed, know how solve question?

i had same problem translating "male" or "female" value native language. solution this:

var getfacebookdata = function(){ fb.api('/me?fields=gender,',function(response){   if (response.gender === 'male'){     var genero = 'hombre'; // change "male" value other   } else { // "female" value other     var genero = 'mujer';    };   $('#some_div_id').text('sexo: '+ genero); })}; 

i hope helps, greetings.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -