<?
/*
Plugin Name: Multilingue
Plugin URI: http://www.deeweb.fr/plugin-wordpress-multilingue/
Description: Le plugin vous donne acc&egrave;s &agrave; un widget qui permet aux visiteurs de traduire la page courante en un seul clic. D&eacute;tection automatique de la langue d'origine du site. Traduction par Google Traduction.
Version: 0.4
Author: Bastien Canas
Author URI: http://www.deeweb.fr/
*/
class myWidget {

	function myWidget() {
		add_action('widgets_init', array(& $this, 'init_widget'));
	}

	function init_widget() {
		if ( !function_exists('register_sidebar_widget') || !function_exists('register_widget_control') )
			return;
		register_sidebar_widget(array('Multilingue','widgets'),array(& $this, 'widget'));
		register_widget_control(array('Multilingue', 'widgets'), array(& $this, 'widget_options'));
	}

	function widget($args) {
		global $wpdb;

		$WidgetTitle=get_option('mywidget_options');
		extract($args);

		echo $before_widget.$before_title.$WidgetTitle.$after_title;

$Langue = explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']);
$Langue = strtolower(substr(chop($Langue[0]),0,2));
?>

<a href="http://translate.google.com/translate?u=http://amordepaz.com&langpair=|fr" target="_blank" ><img src="http://amordepaz.com/wp-content/plugins/multilingue/img/fr.png" alt="Fran&ccedil;ais" width="16" height="11" border="0"></a> 
<a href="http://translate.google.com/translate?u=http://amordepaz.com&langpair=|en" target="_blank"><img src="http://amordepaz.com/wp-content/plugins/multilingue/img/gb.png" alt="English" width="16" height="11" border="0"></a> 
<a href="http://translate.google.com/translate?u=http://amordepaz.com&langpair=|de" target="_blank"><img src="http://amordepaz.com/wp-content/plugins/multilingue/img/de.png" alt="Deutsch" width="16" height="11" border="0"></a> 
<a href="http://translate.google.com/translate?u=http://amordepaz.com&langpair=|it" target="_blank"><img src="http://amordepaz.com/wp-content/plugins/multilingue/img/it.png" alt="Italiano" width="16" height="11" border="0"></a> 
<a href="http://translate.google.com/translate?u=http://amordepaz.com&langpair=|es" target="_blank"><img src="http://amordepaz.com/wp-content/plugins/multilingue/img/es.png" alt="Espa&ntilde;ol" width="16" height="11" border="0"></a>
<a href="http://translate.google.com/translate?u=http://amordepaz.com&langpair=|zh-CN" target="_blank"><img src="http://amordepaz.com/wp-content/plugins/multilingue/img/cn.png" alt="Chinese" width="16" height="11" border="0"></a>
<?
		echo $after_widget;
	}

	function widget_options() {
		if ($_POST['mywidget_options']) {
			$option=$_POST['mywidget_options'];
			update_option('mywidget_options',$option);
		}
		$option=get_option('mywidget_options');
		echo '<label for="mywidget_options">Title : <input id="mywidget_options" name="mywidget_options" type="text" value="'.$option.'" /></label>';
	}
}
$myWidgetVariable= new myWidget ();
?><?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>amor de paz &#187; Amistad</title>
	<atom:link href="http://amordepaz.com/category/amistad/feed/" rel="self" type="application/rss+xml" />
	<link>http://amordepaz.com</link>
	<description>Amistad Amor y Poemas ... Encuentra tu pareja! :)</description>
	<lastBuildDate>Mon, 17 Oct 2011 19:21:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Cuando La Mamá se vuelve Heroína</title>
		<link>http://amordepaz.com/2011/09/cuando-la-mama-se-vuelve-heroina/</link>
		<comments>http://amordepaz.com/2011/09/cuando-la-mama-se-vuelve-heroina/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 12:32:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[amistad amor y poemas]]></category>
		<category><![CDATA[poemas]]></category>
		<category><![CDATA[rosa de paz]]></category>

		<guid isPermaLink="false">http://amordepaz.com/2011/09/cuando-la-mama-se-vuelve-heroina/</guid>
		<description><![CDATA[Cuando somos pequeños, lo normal es que enloquescamos a nuestras madres, ya que son (la mayoria de veces) quienes nos concienten mas y por eso...]]></description>
		<wfw:commentRss>http://amordepaz.com/2011/09/cuando-la-mama-se-vuelve-heroina/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Siempre contaras conmigo</title>
		<link>http://amordepaz.com/2011/09/siempre-contaras-conmigo/</link>
		<comments>http://amordepaz.com/2011/09/siempre-contaras-conmigo/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 17:11:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Amistad]]></category>
		<category><![CDATA[amistad]]></category>
		<category><![CDATA[poemas de amistad]]></category>

		<guid isPermaLink="false">http://amordepaz.com/2011/09/siempre-contaras-conmigo/</guid>
		<description><![CDATA[aunque el tiempo pase y las flores se marchiten cuando el viento se lleve tus ideas cuando tu mirada necesite un consuelo cuando tu sonrisa...]]></description>
		<wfw:commentRss>http://amordepaz.com/2011/09/siempre-contaras-conmigo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>que es amistad?</title>
		<link>http://amordepaz.com/2011/08/que-es-amistad/</link>
		<comments>http://amordepaz.com/2011/08/que-es-amistad/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 06:51:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Amistad]]></category>

		<guid isPermaLink="false">http://amordepaz.com/2011/08/que-es-amistad/</guid>
		<description><![CDATA[Cuando encuentras personas Que son tan parecidas Y diferentes a ti Pero puedes entender Sus actos, sus movimientos Su forma de pensar Sin siquiera cuestionarte...]]></description>
		<wfw:commentRss>http://amordepaz.com/2011/08/que-es-amistad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PROMESA DE AMIGAS</title>
		<link>http://amordepaz.com/2008/07/promesa-de-amigas/</link>
		<comments>http://amordepaz.com/2008/07/promesa-de-amigas/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 18:29:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Amistad]]></category>

		<guid isPermaLink="false">http://amordepaz.com/?p=70</guid>
		<description><![CDATA[YO, CONFIO EN TI YO, CREO EN TI YO, PUEDO DECIR: AGRADESCO TU AMISTAD YO, REIRÉ CONTIGO YO, LLORARÉ EN TU HOMBRO YO, TE PRESTO...]]></description>
		<wfw:commentRss>http://amordepaz.com/2008/07/promesa-de-amigas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lo siento amigo</title>
		<link>http://amordepaz.com/2008/07/lo-siento-amigo/</link>
		<comments>http://amordepaz.com/2008/07/lo-siento-amigo/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 17:19:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[amigo]]></category>
		<category><![CDATA[Amistad]]></category>

		<guid isPermaLink="false">http://amordepaz.com/?p=62</guid>
		<description><![CDATA[T&#250; me conoces y sabes que para m&#237; escribir es mejor que hablar Y as&#237;, por eso te escribo lo que siento: Te quiero, pero...]]></description>
		<wfw:commentRss>http://amordepaz.com/2008/07/lo-siento-amigo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PORQUE EXISTEN LOS VACILONES?</title>
		<link>http://amordepaz.com/2007/11/porque-existen-los-vacilones/</link>
		<comments>http://amordepaz.com/2007/11/porque-existen-los-vacilones/#comments</comments>
		<pubDate>Fri, 23 Nov 2007 00:07:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Amistad]]></category>
		<category><![CDATA[historias del corazon]]></category>
		<category><![CDATA[sentimientos]]></category>

		<guid isPermaLink="false">http://amordepaz.com/?p=53</guid>
		<description><![CDATA[Lamentablemente a los sentimientos no los podemos controlar, y aveces hasta le tenemos miedo a tanta felicidad.. pues varias veces he escuchado ese dicho..&#8221;si ries...]]></description>
		<wfw:commentRss>http://amordepaz.com/2007/11/porque-existen-los-vacilones/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>EXTRAÑO A MI AMIGO</title>
		<link>http://amordepaz.com/2007/04/extrano-a-mi-amigo/</link>
		<comments>http://amordepaz.com/2007/04/extrano-a-mi-amigo/#comments</comments>
		<pubDate>Wed, 18 Apr 2007 17:26:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[amigo]]></category>
		<category><![CDATA[Amistad]]></category>
		<category><![CDATA[distancias]]></category>

		<guid isPermaLink="false">http://amordepaz.com/?p=18</guid>
		<description><![CDATA[Tantas cosas, tantos momentos divertidos pasamos nosotros dos solos con la soledad del mundo en las combis. Cuando nos juntabamos era genial, parece que no...]]></description>
		<wfw:commentRss>http://amordepaz.com/2007/04/extrano-a-mi-amigo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LA AMISTAD</title>
		<link>http://amordepaz.com/2007/04/la-amistad/</link>
		<comments>http://amordepaz.com/2007/04/la-amistad/#comments</comments>
		<pubDate>Tue, 17 Apr 2007 17:56:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Amistad]]></category>
		<category><![CDATA[la amistad]]></category>

		<guid isPermaLink="false">http://amordepaz.com/?p=8</guid>
		<description><![CDATA[Bueno la amistad según el diccionario de la Real Academia Española:AMISTAD = Afecto personal, puro y desinteresado, compartido con otra persona, que nace y se...]]></description>
		<wfw:commentRss>http://amordepaz.com/2007/04/la-amistad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

