Need to translate the login widget with polylang

Hi there,

I have a site that uses three languages and I’m using polylang in order to do it. So… When I need to do it in another places i use the following code:

<?php if ( !function_exists( 'pll_current_language' ) ) { require_once '/include/api.php'; } $field = 'slug'; $result = pll_current_language($field); if($result=="es"){ $menuLocation="main_es"; }elseif($result=="en"){ .... etc ?>

So…Can someone point me in the right direction in order to change the text (and the links to the register page because I have a different one for each language).

Thanks in advance for your help.