Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Testing plugin translations
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  10 messages - Collapse all  -  Translate all to Translated (View all originals)
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:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
James Davis  
View profile  
 More options Oct 4 2007, 3:25 am
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


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ozh  
View profile  
 More options Oct 4 2007, 3:58 am
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


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Davis  
View profile  
 More options Oct 4 2007, 4:09 am
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


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "WP's Physical Path" by Keith Murray
Keith Murray  
View profile  
 More options Oct 4 2007, 11:27 am
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


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Austin Matzko  
View profile  
 More options Oct 4 2007, 11:32 am
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

    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Benedict Eastaugh  
View profile  
 More options Oct 4 2007, 11:33 am
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 want the ABSPATH constant.
_______________________________________________
wp-hackers mailing list
wp-hack...@lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers

    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Westwood  
View profile  
 More options Oct 4 2007, 11:34 am
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

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


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Günsche  
View profile  
 More options Oct 4 2007, 11:36 am
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

On Thu, 2007-10-04 at 08:27 -0700, Keith Murray wrote:
> What I need to get is a path like:
> /home/users/my_account/somedomain.com/wordpress

The constant ABSPATH serves this purpose.

Regards,
Alex

--
Alex Günsche, Zirona OpenSource-Consulting
Blogs: http://www.zirona.com/ | http://www.regularimpressions.net
PubKey for this address: http://www.zirona.com/misc/ag.ml2007.asc

_______________________________________________
wp-hackers mailing list
wp-hack...@lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Keith Murray  
View profile  
 More options Oct 4 2007, 11:37 am
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

_______________________________________________
wp-hackers mailing list
wp-hack...@lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers

    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Benedict Eastaugh  
View profile  
 More options Oct 4 2007, 11:42 am
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
The Redalt xref has a full list of the constants in WP trunk:

http://xref.redalt.com/wptrunk/nav.htm?_constants/index.htm
_______________________________________________
wp-hackers mailing list
wp-hack...@lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google