<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Hijacking WordPress Internationalisation</title>
	<atom:link href="http://byotos.com/2010/04/08/hijacking-wordpress-internationalisation/feed/" rel="self" type="application/rss+xml" />
	<link>http://byotos.com/2010/04/08/hijacking-wordpress-internationalisation/</link>
	<description></description>
	<lastBuildDate>Sun, 01 Apr 2012 19:45:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Ray</title>
		<link>http://byotos.com/2010/04/08/hijacking-wordpress-internationalisation/#comment-31</link>
		<dc:creator><![CDATA[Ray]]></dc:creator>
		<pubDate>Fri, 14 May 2010 07:10:37 +0000</pubDate>
		<guid isPermaLink="false">http://byotos.com/?p=129#comment-31</guid>
		<description><![CDATA[Paul, thanks for the moment of clarity!
Of course it has to do with setting the priority for the init action! *slaps head*

Thanks also for the add_entry() tidbit, I&#039;ll look into that!]]></description>
		<content:encoded><![CDATA[<p>Paul, thanks for the moment of clarity!<br />
Of course it has to do with setting the priority for the init action! *slaps head*</p>
<p>Thanks also for the add_entry() tidbit, I&#8217;ll look into that!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Gibbs</title>
		<link>http://byotos.com/2010/04/08/hijacking-wordpress-internationalisation/#comment-30</link>
		<dc:creator><![CDATA[Paul Gibbs]]></dc:creator>
		<pubDate>Fri, 14 May 2010 06:18:31 +0000</pubDate>
		<guid isPermaLink="false">http://byotos.com/?p=129#comment-30</guid>
		<description><![CDATA[For Welcome Pack&#039;s email feature, I use the above technique and have it hooked in like so:

&lt;code&gt;add_action( &#039;init&#039;, &#039;dpw_load_dynamic_i18n&#039;, 9 );&lt;/code&gt;

Have a look dpw_load_dynamic_i18n() in &lt;a href=&quot;http://svn.wp-plugins.org/welcome-pack/trunk/includes/welcome-pack-core.php&quot; rel=&quot;nofollow&quot;&gt;Welcome Pack&#039;s core.php&lt;/a&gt;. It is a bit hard to read as there&#039;s a pair of nested FOR loops, but would suggest you use MO-&gt;add_entry() etc rather than write directly to the arrays. I think I switched to doing that after I wrote the above post.]]></description>
		<content:encoded><![CDATA[<p>For Welcome Pack&#8217;s email feature, I use the above technique and have it hooked in like so:</p>
<p><code>add_action( 'init', 'dpw_load_dynamic_i18n', 9 );</code></p>
<p>Have a look dpw_load_dynamic_i18n() in <a href="http://svn.wp-plugins.org/welcome-pack/trunk/includes/welcome-pack-core.php" rel="nofollow">Welcome Pack&#8217;s core.php</a>. It is a bit hard to read as there&#8217;s a pair of nested FOR loops, but would suggest you use MO-&gt;add_entry() etc rather than write directly to the arrays. I think I switched to doing that after I wrote the above post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ray</title>
		<link>http://byotos.com/2010/04/08/hijacking-wordpress-internationalisation/#comment-29</link>
		<dc:creator><![CDATA[Ray]]></dc:creator>
		<pubDate>Fri, 14 May 2010 05:18:44 +0000</pubDate>
		<guid isPermaLink="false">http://byotos.com/?p=129#comment-29</guid>
		<description><![CDATA[Hey Paul,

Was meaning to reply to this the other day, but got sidetracked!
Just tried it and it does what I want it to do, except for one instance.

I&#039;m trying to override a string that BP uses on an AJAX request (in my case, when a private message is sent, BP outputs a message).

I&#039;ve tried overriding the string by hooking into the &quot;init&quot; action, but not sure if this is the correct action I should be hooking into.

Here&#039;s the full function:

&lt;code&gt;
function ray_override_l10n() {
	global $l10n;

	$mo = new MO();

	$l10n[&#039;buddypress&#039;] = &amp;$mo;

	if ( isset( $l10n[&#039;buddypress&#039;] ) ) {
		$l10n[&#039;buddypress&#039;]-&gt;entries[&#039;There was an error sending that message, please try again&#039;]-&gt;translations[0] = &#039;You are not friends with the person(s) you are attempting to send a message to.  Your message has not been sent.&#039;;

		$l10n[&#039;buddypress&#039;]-&gt;entries[&#039;There was a problem sending that reply. Please try again.&#039;]-&gt;translations[0] = &#039;You are not friends with the person(s) you are attempting to send a message to.  Your message has not been sent.&#039;;
	}
}
add_action( &#039;init&#039;, &#039;ray_override_l10n&#039; );
&lt;/code&gt;

Any ideas?]]></description>
		<content:encoded><![CDATA[<p>Hey Paul,</p>
<p>Was meaning to reply to this the other day, but got sidetracked!<br />
Just tried it and it does what I want it to do, except for one instance.</p>
<p>I&#8217;m trying to override a string that BP uses on an AJAX request (in my case, when a private message is sent, BP outputs a message).</p>
<p>I&#8217;ve tried overriding the string by hooking into the &#8220;init&#8221; action, but not sure if this is the correct action I should be hooking into.</p>
<p>Here&#8217;s the full function:</p>
<p><code><br />
function ray_override_l10n() {<br />
	global $l10n;</p>
<p>	$mo = new MO();</p>
<p>	$l10n['buddypress'] = &amp;$mo;</p>
<p>	if ( isset( $l10n['buddypress'] ) ) {<br />
		$l10n['buddypress']-&gt;entries['There was an error sending that message, please try again']-&gt;translations[0] = 'You are not friends with the person(s) you are attempting to send a message to.  Your message has not been sent.';</p>
<p>		$l10n['buddypress']-&gt;entries['There was a problem sending that reply. Please try again.']-&gt;translations[0] = 'You are not friends with the person(s) you are attempting to send a message to.  Your message has not been sent.';<br />
	}<br />
}<br />
add_action( 'init', 'ray_override_l10n' );<br />
</code></p>
<p>Any ideas?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

