Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #303237

    I have a Customized Password Form on a Protected Site in spanish. I need to have a translation added for englisch.

    My customisation for spanish looks like this:
    add_filter( 'the_password_form', 'custom_password_form' );
    function custom_password_form() {
    global $post;
    $label =  and so on , ....

    How can I translate it with WPML? Should I try something like this:
    if ( ICL_LANGUAGE_CODE == 'en' ) {

    • This topic was modified 10 years, 3 months ago by Yigit.
    #303346

    Hi royaltask!

    Yes exactly – use this code like:

    
    add_filter( 'the_password_form', 'custom_password_form' );
    function custom_password_form() {
    global $post;
    $label =  "spanish label...";
    if(defined(ICL_LANGUAGE_CODE) && ICL_LANGUAGE_CODE == 'en') $label =  "english label..";
    ...
    

    Cheers!
    Peter

    #307863

    thanks for the hint.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Customized Password Form on Protected Site -> translation with WPML’ is closed to new replies.