WordPress.org

Ready to get started?Download WordPress

Forums

Theme My Login
[resolved] Multilang with new version of the plugin (8 posts)

  1. Buszort
    Member
    Posted 1 year ago #

    Hello

    Thanks for the new version !
    Yesterday I have updated plugin to new version 6.2. I'm using also qtranslate with pre-patch mode (adds lang prefix at the end of the url e.g /en/). Now I'm only able to navigate in primary lang, links which coming from my theme plugin are stripping lang prefix. How to preserve this url lang code removal. Thx.

    Buszort

    http://wordpress.org/extend/plugins/theme-my-login/

  2. Jeff Farthing
    Member
    Plugin Author

    Posted 1 year ago #

    Which URL's are being affected? Just the login related URL's or all?

  3. Buszort
    Member
    Posted 1 year ago #

    Just login related (login, register, lostpassword, etc...). All others works fine.

    In my theme I'm fetching urls via global variable;
    $GLOBALS['theme_my_login']->get_login_page_link( 'action=register' );
    Links returned by:
    Theme_My_Login_Template::get_action_links

    don't have language code as well.

  4. Jeff Farthing
    Member
    Plugin Author

    Posted 1 year ago #

    Try adding this to wp-content/plugins/theme-my-login-custom.php:

    function tml_page_link_filter( $link ) {
    	return qtrans_convertURL( $link );
    }
    add_filter( 'tml_page_link', 'tml_page_link_filter' );

    That should handle most, if not all, of TML's links.

  5. Buszort
    Member
    Posted 1 year ago #

    Hi Jeff

    I don't know how to thank you. I have added your code at the bottom of theme-my-login.php file and now I have all languages available in your plugin!

    Big Thanks once again

    Buszort

  6. loubas
    Member
    Posted 1 year ago #

    Hi,

    What should I change if I want qtranslate to translate the title of my custom links that are created with theme my login?

    Thank you very much!

  7. Jeff Farthing
    Member
    Plugin Author

    Posted 1 year ago #

    You would instead need to use the tml_title filter and whatever function qtranslate uses to translate strings.

  8. thatwastaxing
    Member
    Posted 1 year ago #

    Tried Jeff's function but it didn't work. Another member did post something that did work here: http://wordpress.org/support/topic/patch-qtranslate-support-for-forms-that-are-redirected-after-submission

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic