• Hello..

    Just installed the plugin and figured out it was not translatable. Languages folder was missing so i created that and used Loco translate plugin to generate the .pot file.

    I have now translated the plugin but it only works in plugin settings, popup are not beeing translated.

    Also found as when logged on as admin and clicking the login again the popup appear with links to dashboard etc. But when logged in as customer there is no links, only the info text.

    Brgds
    Rune

    • This topic was modified 7 years, 6 months ago by ArcticFritid.
Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter ArcticFritid

    (@metuza)

    Ok, i have fixed everything.. I found that the load textdomain action was commented out and no function set for that. Set a new function for languages folder and translation now works perfect.

    Great plugin ??

    Thread Starter ArcticFritid

    (@metuza)

    Well, after fixing the small issues around i found that it actually destroy my sites cache on all pages.. I just had to deactivate it again ??

    Hi,

    Did you manage to fix it? Could you please explain how in that case? ?? Have exactly the same problem where I translated it (to norwegian btw) and not sure exactly what the function should look like.

    • This reply was modified 7 years, 6 months ago by mellowism.
    Thread Starter ArcticFritid

    (@metuza)

    Here you have the edited code, staring in line 47 of file plugin.php


    public static function instance() {
    if ( ! isset( self::$instance ) && ! ( self::$instance instanceof WOO_LOGIN_POPUP_SHORTCODES ) ) {
    self::$instance = new WOO_LOGIN_POPUP_SHORTCODES;
    self::$instance->setup_constants();

    add_action( 'plugins_loaded', array( self::$instance, 'load_textdomain' ) );

    self::$instance->includes();
    // self::$instance->roles = new WIDGETOPTS_Roles();
    }
    return self::$instance;
    }

    function load_textdomain() {

    load_plugin_textdomain( 'woo-login-popup-shortcodes', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' );

    }

    Brgds
    Rune

    Thread Starter ArcticFritid

    (@metuza)

    Remove the 2 slashes in front of:
    add_action( 'plugins_loaded', array( self::$instance, 'load_textdomain' ) );

    Then just add in the below function:

    function load_textdomain() {
    
    load_plugin_textdomain( 'woo-login-popup-shortcodes', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' );
    
    }

    Seems to have done the trick ?? Thank you very much!

    And to the developer, great plugin, but please add this in code so more can easily translate it with Loco ??

    Thanks for the code Metuza!!

    Do you know where to translate the “First Name” and “Last Name” texts?

    Screenshot

    Thanks!

    Thread Starter ArcticFritid

    (@metuza)

    Do you use Loco translate plugin? I mean to remember i translated everything using Loco. I have no other answer because i deleted login plugin as it conflicted with my caching.

    Thanks for your answer! Yes, but for some strange reason, “First Name” and “Last Name” are not part of the translation list.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Not translatable’ is closed to new replies.