How I can take user gender in certificate template in :
Example when I give certificate to gender female, cause I’m running on russian language, I need to add endings to words.
I think add in JS and django template, like:
if DJANGO_LANGUAGE == ‘RU’:
get inner text
update ending of words
I’m not sure how useful my reply is by now haha. To my knowledge, the certificate context doesn’t include any gender information, unfortunately. But I do have somewhat of a hacky solution in mind…
Setup edxapp plugin middleware to add the user’s gender to the context. Or you can just edit the edX platform’s
Once you’re passing the gender, you’ll want to create a custom certificate template either for all courses, or for all courses in an organization, or for a specific course.
In the custom certificate template, you want to use the django template to create the if/else condition based on the extra gender context your middleware is injecting.
Let me know, though, if this doesn’t meet your expectations please and I’ll try to think of an alternative if possible.