Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter halibutt

    (@halibutt)

    Just to make it clear, adding the following code right under class Arconix_Portfolio doesn’t seem to do the job.

    /**
    	* Action: init
    	*/
    	function ap_action_init()
    	{
    		// Localization
    		load_plugin_textdomain('arconix-portfolio', false, dirname(plugin_basename(__FILE__)) . '/languages');
    	}
    Plugin Author John Gardner

    (@jgardner03)

    Hi Halibutt,

    Thank you for using my plugin and for the kind words. Unfortunately I have not yet prepared my plugin for translation, so I apologize for the trouble you’re having.

    Can you try change the domain argument in the load_plugin_textdomain() function to acp instead of arconix-portfolio?

    Once I formally set up my plugin for transaltion I will be switching the text domain to arconix-portfolio so to prevent potential conflicts.

    Thread Starter halibutt

    (@halibutt)

    Sadly, I don’t know where to put the load_plugin_textdomain() function, so whether it’s arconix-portfolio, acp or anything else in the .po and .mo files doesn’t change much, does it. I tried to put the entire clause in plugin.php by trial and error, but nothing seemed to work.

    Also, are you planning to release this new localizable version any time soon? It seems to me it’s already localization-ready, all text clauses are properly marked (or are they?). The only thing it’s lacking is the load_plugin_textdomain() thingie to make it work for all of us out there.

    The reason I’m asking is that I’m working on my new page right now and I’d really like to use your plugin as it seems to be the best out there. However, it’s of no use to me if it’s in a language my users will not recognize (hence the translation I made).
    Cheers

    Plugin Author John Gardner

    (@jgardner03)

    I don’t know the exact state of translatable strings in my plugin, however I can basically walk you through the steps needed to add the necessary functions to enable translation until I do it myself.

    Place the following at the bottom of the __construct() function (before the closing ‘}’) in the file plugin.php

    add_action( 'plugins_loaded', array( $this, 'i18n' ) );

    then somewhere outside the __construct() function, place the following:

    function i18n() {
        load_plugin_textdomain('acp', false, dirname(plugin_basename(__FILE__)) . '/languages');
    }

    Unfortunately I don’t have a timetable for releasing a fully localized update to the plugin, but it is on my roadmap. I believe all the strings are properly set up, but I’m not 100% certain of that, so I don’t want to rush out an update until I have a better grasp as to where that is.

    Thread Starter halibutt

    (@halibutt)

    Thank you, this worked like a charm. ?? I’ll let you know once I post the Polish translation (when my site is back up and running), feel free to use it anyway you see fit.

    It seems the only hard-coded non-translatable string is the word “Display” right next to the list of features (user-side). Everything else is now in my native language. Thanks again for your help – and for this great plugin ??

    Thread Starter halibutt

    (@halibutt)

    In case somebody stumbles on my last post, you can easily change this “Dislay” heading by including the heading="YOUR_NAME_HERE" in your [ portfolio ] code.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Localization’ is closed to new replies.