Testing plugin translations
The group you are posting to is a
Usenet group . Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From:
James Davis <ja... @freecharity.org.uk>
Date: Thu, 04 Oct 2007 08:25:52 +0100
Local: Thurs, Oct 4 2007 3:25 am
Subject: [wp-hackers] Testing plugin translations
A kind volunteer has translated my plugin into Italian. We've produced .po and .mo files for the plugin. plugins/petition/petition.php plugins/petition/petition-it_IT.po plugins/petition/petition-it_IT.mo
In my wp-config.php I've set
define ('WPLANG', 'it_IT');
and in petition.php I've called
load_plugin_textdomain("fcpetition", dirname(__FILE__));
and strings in the plugin are printed with functions such as
_e("Please enter the petition title","fcpetition")
Yet I don't see my plugin's output being displayed in Italian. Am I missing some vital step?
James
-- http://www.freecharity.org.uk/ - Free IT services for charities http://www.freecharity.org.uk/wiki/ - The VCSWiki _______________________________________________ wp-hackers mailing list wp-hack... @lists.automattic.com http://lists.automattic.com/mailman/listinfo/wp-hackers
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
"Ozh" <o... @planetozh.com>
Date: Thu, 4 Oct 2007 09:58:38 +0200
Local: Thurs, Oct 4 2007 3:58 am
Subject: Re: [wp-hackers] Testing plugin translations
>and in petition.php I've called
>load_plugin_textdomain("fcpetition", dirname(__FILE__));
load_plugin_textdomain() needs a path relative to WP's root. >From the source:
$mofile = ABSPATH . "$path/$domain-$locale.mo"; so I think you need something like: load_plugin_textdomain('fcpetition', 'wp-content/plugins/'.plugin_basename(dirname(__FILE__)));
Ozh _______________________________________________ wp-hackers mailing list wp-hack... @lists.automattic.com http://lists.automattic.com/mailman/listinfo/wp-hackers
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
James Davis <ja... @freecharity.org.uk>
Date: Thu, 04 Oct 2007 09:09:59 +0100
Local: Thurs, Oct 4 2007 4:09 am
Subject: Re: [wp-hackers] Testing plugin translations
Ozh wrote:
>>From the source:
> $mofile = ABSPATH . "$path/$domain-$locale.mo";
> so I think you need something like: > load_plugin_textdomain('fcpetition', > 'wp-content/plugins/'.plugin_basename(dirname(__FILE__)));
Thanks. It was that and making sure that the file was named according to the domain I was using, not the filename of the plugin itself. James
-- http://www.freecharity.org.uk/ - Free IT services for charities http://www.freecharity.org.uk/wiki/ - The VCSWiki _______________________________________________ wp-hackers mailing list wp-hack... @lists.automattic.com http://lists.automattic.com/mailman/listinfo/wp-hackers
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Keith Murray <kdmur... @gmail.com>
Date: Thu, 04 Oct 2007 08:27:54 -0700
Local: Thurs, Oct 4 2007 11:27 am
Subject: [wp-hackers] WP's Physical Path
Hi,
I apologize if this is a question with a well-documented answer, but I've been looking for a while and haven't come up with one. I have a plugin that needs to reference a physical path on the host. Is there a WP variable that stores the physical path? Or is there a method of retrieving the physical path of your WP root in some other fashion?
What I need to get is a path like: /home/users/my_account/somedomain.com/wordpress
Ideally this could be done with little or no knowledge of this information by the blogger using the WP plugin.
Thanks,
Keith. _______________________________________________ wp-hackers mailing list wp-hack... @lists.automattic.com http://lists.automattic.com/mailman/listinfo/wp-hackers
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
"Austin Matzko" <if.webs... @gmail.com>
Date: Thu, 4 Oct 2007 11:32:57 -0400
Local: Thurs, Oct 4 2007 11:32 am
Subject: Re: [wp-hackers] WP's Physical Path
On 10/4/07, Keith Murray <kdmur... @gmail.com> wrote:
> Is there a > WP variable that stores the physical path?
I think you're looking for the constant ABSPATH _______________________________________________ wp-hackers mailing list wp-hack... @lists.automattic.com http://lists.automattic.com/mailman/listinfo/wp-hackers
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
"Benedict Eastaugh" <ionf... @gmail.com>
Date: Thu, 4 Oct 2007 16:33:06 +0100
Local: Thurs, Oct 4 2007 11:33 am
Subject: Re: [wp-hackers] WP's Physical Path
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Peter Westwood <peter.westw... @ftwr.co.uk>
Date: Thu, 04 Oct 2007 16:34:32 +0100
Local: Thurs, Oct 4 2007 11:34 am
Subject: Re: [wp-hackers] WP's Physical Path
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Keith Murray wrote:
> Hi,
> I apologize if this is a question with a well-documented answer, but > I've been looking for a while and haven't come up with one. I have a > plugin that needs to reference a physical path on the host. Is there a > WP variable that stores the physical path? Or is there a method of > retrieving the physical path of your WP root in some other fashion?
> What I need to get is a path like: > /home/users/my_account/somedomain.com/wordpress
> Ideally this could be done with little or no knowledge of this > information by the blogger using the WP plugin.
ABSPATH is your friend I think westi - -- Peter Westwood http://blog.ftwr.co.uk -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHBQgIVPRdzag0AcURAnyKAJ4pwxFYrWjASKqBIwQ6wPSceHW2EgCfbDRY Ol4ytZXX6hMnXdjgXwEvy+s= =sTtf -----END PGP SIGNATURE----- _______________________________________________ wp-hackers mailing list wp-hack... @lists.automattic.com http://lists.automattic.com/mailman/listinfo/wp-hackers
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Alex Günsche <ag.ml2... @zirona.com>
Date: Thu, 04 Oct 2007 17:36:26 +0200
Local: Thurs, Oct 4 2007 11:36 am
Subject: Re: [wp-hackers] WP's Physical Path
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Keith Murray <kdmur... @gmail.com>
Date: Thu, 04 Oct 2007 08:37:41 -0700
Local: Thurs, Oct 4 2007 11:37 am
Subject: Re: [wp-hackers] WP's Physical Path
Thanks Peter, Austin & Benedict for the speedy responses. Apparently I just needed to look a little harder... K
Peter Westwood wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> Keith Murray wrote:
>> Hi,
>> I apologize if this is a question with a well-documented answer, but >> I've been looking for a while and haven't come up with one. I have a >> plugin that needs to reference a physical path on the host. Is there a >> WP variable that stores the physical path? Or is there a method of >> retrieving the physical path of your WP root in some other fashion?
>> What I need to get is a path like: >> /home/users/my_account/somedomain.com/wordpress
>> Ideally this could be done with little or no knowledge of this >> information by the blogger using the WP plugin.
> ABSPATH is your friend I think
> westi > - -- > Peter Westwood > http://blog.ftwr.co.uk > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.2 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> iD8DBQFHBQgIVPRdzag0AcURAnyKAJ4pwxFYrWjASKqBIwQ6wPSceHW2EgCfbDRY > Ol4ytZXX6hMnXdjgXwEvy+s= > =sTtf > -----END PGP SIGNATURE----- > _______________________________________________ > wp-hackers mailing list > wp-hack... @lists.automattic.com > http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________ wp-hackers mailing list wp-hack... @lists.automattic.com http://lists.automattic.com/mailman/listinfo/wp-hackers
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
"Benedict Eastaugh" <ionf... @gmail.com>
Date: Thu, 4 Oct 2007 16:42:47 +0100
Local: Thurs, Oct 4 2007 11:42 am
Subject: Re: [wp-hackers] WP's Physical Path
You must
Sign in before you can post messages.
You do not have the permission required to post.