Update certificate text depending on gender?

Hi, there!
How I can take user gender in certificate template in :
/edx/app/edxapp/edx-platform/lms/templates/certificates/_accomplishment-rendering.html
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’:
{some html}
<script>
document.get.elementByID(“some_id”)
get inner text
update ending of words
</script>