Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Metin Saylan

    (@mattsay)

    It should use wordpress core language.

    Language files are located in js folder of the plugin.

    Unfortunately it does not change language in my blog. My blog is in German, but the count down is in English.

    What can I do to change this?

    Thank you for your help.

    This code in class constructor is incorrect:

    if($lang!='en' && file_exists( plugins_url('js/jquery.countdown-' . $lang . '.js', __FILE__)) ){
        wp_enqueue_script('countdown-l10n', plugins_url('js/jquery.countdown-' . $lang . '.js',__FILE__), 'countdown', '1.0', false);
    }

    The file_exists function requires a path to the file not url! The condition is never true and the script is not loaded.

    Replace the code above with:

    if($lang!='en' && file_exists( plugin_dir_path(__FILE__) . 'js/jquery.countdown-' . $lang . '.js') ){
        wp_enqueue_script('countdown-l10n', plugins_url('js/jquery.countdown-' . $lang . '.js',__FILE__), 'countdown', '1.0', false);
    }

    That’s it. Enjoy.

    Good work Frank P. Talentynowicz

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: WordPress Countdown Widget] LANGUAGE’ is closed to new replies.