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
Post a Comment