Support » Plugin: Transposh WordPress Translation » Is there any way to translate WordPress native registration form?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Ofer Wald

    (@oferwald)

    Not that I was able to find yet, there is a real problem with that as the calls required for the translation don’t work on that page

    OK, thanks for the answer.

    Idea: isn’t there any filter or hook that one can insert prior to registration form display? What if I had the .po/mo files for the WP english version in the wp-content/languages dir altogether with the ES_es files, and via this filter I could redefine the WPLANG constant before WP init? You think it’s viable?

    Plugin Author Ofer Wald

    (@oferwald)

    I am sure there might be a viable solution, changing the locale is something that is already done in Transposh, but in this page things are not really “normal”

    The solution (actually a bypass) is to use a 3rd party login/registration page which can be translated. I remember seeing something like that in the past, but I really don’t recall what the exact plugin was

    ok, that’s good to know. I’ll search for a custom registration plugin with it’s own processing form. I’m currently customizing the registration process via Register Plus Redux, which is just great, but since this plugin does uses the native WP registration form, it cannot be translated 🙁

    Plugin Author Ofer Wald

    (@oferwald)

    Would appreciate it if you’ll post your findings once you are done 🙂

    ok, I’ll let you know.

    I have found one way to translate the registration form – add this code into your themes functions.php:

    function my_translate()
    {
       $your_content=ob_get_contents();
       $your_content= str_replace('Username',        'blabla2222',$your_content);
       $your_content= str_replace('Email Address',   'blabla4444', $your_content);
    
       ob_get_clean();
       echo $your_content;
    }
    add_action( 'register_form', 'my_translate' );

    of course, add or change the words with your desired ones..

    Sorry, here is the better function:

    function my_translate()
    {
       $your_content=ob_get_contents();
       $your_content= str_replace('Username:',        'blabla2222',$your_content);
       $your_content= str_replace('Email Address:',   'blabla4444', $your_content);
    
       ob_get_clean();
       echo $your_content;
    }
    add_action( 'register_form', 'my_translate' );

    But keep in mind, use the correct uppercase for the translation words, otherwise the above function may translate the inner html codes (for example, it not only translates Username to blabla222, but may translate the inner html code- for example: <input name="username"> to <input name="blabla222">.

    so, to avoid that, you should use only the correct words for tranlation (correctly typed word in current Upper/lowercase). also, it is good to catch the words correctly with : symbol

    Plugin Author Ofer Wald

    (@oferwald)

    Hello @selnomeria

    Your solution does not answer the how to get the language for this from the url, and also – what you have done is probably much easier by using the .po/.mo files and setting the appropriate locale

    🙂

    so, i guess, there is stil no solution to get the registration translated ? 🙁

    Plugin Author Ofer Wald

    (@oferwald)

    Nothing yet 🙁

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Is there any way to translate WordPress native registration form?’ is closed to new replies.