pro-sites translation not working

The files psts-es_ES.po and .mo are not working, I copy them to the languages folder inside the plugin and in the languages folder in the content directory. Nothing is translated.

  • Pablo
    • New Recruit

    Yes, my dashboard is in spanish and I check wp-config and the WP_LANG is set to es_ES, and the translation is not working. I need only the front end in spanish, and been more specific, the checkout page, and I dont want to hack the plugin changing direclty the frases in the files because the new versions of the plugin will delete that changes. I cant find what im doing wrong.

  • aristath
    • Recruit

    @Pablo Could you please try updating the plugin to its latest release?
    Also, if you can send me your admin & FTP credentials I'll be able to see what is happening and help you figure this one out...

    - Please send an email using our secure contact for on https://premium.wpmudev.org/contact/
    - On the subject of the email enter "attn: aristath"
    - On the body of your message include a link to this thread, a link to your site, your superadmin credentials and your FTP credentials as well.

    Cheers,
    Ari.

  • janslu
    • Flash Drive

    There's an error in the plugin language functions. Devs should take a look at it. The languages folder exists in PLUGINS/pro-sites/pro-sites-files/languages/

    Localization function doesn't even look in this place:

    function localization() {
        // Load up the localization file if we're using WordPress in a different language
      	// Place it in this plugin's "languages" folder and name it "psts-[value in wp-config].mo"
    		$mu_plugins = wp_get_mu_plugins();
    		$lang_dir = dirname(plugin_basename(__FILE__)) . '/pro-sites/languages/';
    		$custom_path = WP_LANG_DIR . '/pro-sites/psts-' . get_locale() . '.mo';
    
    		if ( file_exists($custom_path) ) {
    			load_textdomain('psts', $custom_path);
    		} elseif ( in_array($this->plugin_file, $mu_plugins) ) {
    			load_muplugin_textdomain('psts', $lang_dir);
    		} else {
    			load_plugin_textdomain('psts', false, $lang_dir);
    		}
    
        //setup language code for jquery datepicker translation
        $temp_locales = explode('_', get_locale());
      	$this->language = ($temp_locales[0]) ? $temp_locales[0] : 'en';
      }

    I couldn't get it to work until I moved the .po file to wp-content/languages/pro-sites/ folder. This should be updated.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.