<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>gengo on Silicone&#39;s web</title>
		<link>https://silicone.homelinux.org/tags/gengo/</link>
		<description>Recent content in gengo on Silicone&#39;s web</description>
		<generator>Hugo</generator>
		<language>fr</language>
		
		
		
		
			<lastBuildDate>Sun, 23 Feb 2014 21:57:02 +0100</lastBuildDate>
		
			<atom:link href="https://silicone.homelinux.org/tags/gengo/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title> From gengo to polylang: updating the theme</title>
				<link>https://silicone.homelinux.org/2014/02/19/from-gengo-to-polylang-updating-the-theme/</link>
				<pubDate>Wed, 19 Feb 2014 23:28:32 +0100</pubDate>
				<guid>https://silicone.homelinux.org/2014/02/19/from-gengo-to-polylang-updating-the-theme/</guid>
				<description>&lt;p&gt;So I postponed hacking a mode with multiple languages on the same page and decided to set polylang on my &lt;del&gt;production site&lt;/del&gt; (hem) my blog.&lt;/p&gt;&#xA;&lt;p&gt;But Gengo was using some customized template tags so the theme was adapted to it and this needed to be changed.&lt;/p&gt;&#xA;&lt;p&gt;With polylang it’s a lot simpler, all navigation is handled by filters, so only thing really custom had to be written:&lt;/p&gt;&#xA;&lt;p&gt;Basically my hacked version of &lt;code&gt;the_translations&lt;/code&gt; had to be ported. And to keep it simple it can even be part of the &lt;code&gt;functions.php&lt;/code&gt; file in the theme and use the &lt;a href=&#34;http://polylang.wordpress.com/documentation/documentation-for-developers/functions-reference/#pll_the_languages&#34; title=&#34;Polylang function reference pll_the_languages&#34;&gt;&lt;code&gt;pll_the_languages&lt;/code&gt;&lt;/a&gt; function.&lt;br&gt;&#xA;I want to display the other language title prefixed by “Language version” written in this language. As the &lt;em&gt;gettext&lt;/em&gt; like functions would only return strings in the current language, I hardcoded those strings, but adding them in Polylang admin “strings translation” would have been nice…&lt;br&gt;&#xA;So here is the code:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt; $translation_title=array(&#xA;    &amp;#39;en&amp;#39; =&amp;gt; &amp;#34;English version:&amp;#34;, &#xA;    &amp;#39;fr&amp;#39; =&amp;gt; &amp;#34;Version française&amp;amp;nbsp;: &amp;#34;);&#xA;function my_translations() {&#xA;    global $post;&#xA;    global $translation_title;&#xA;    $post_id=$post-&amp;gt;ID;&#xA;    if ( function_exists(&amp;#39;pll_the_languages&amp;#39;) ) {&#xA;        $translations = pll_the_languages(array(&amp;#39;post_id&amp;#39; =&amp;gt; $post_id, &amp;#39;hide_if_no_translation&amp;#39;=&amp;gt;1, &amp;#39;hide_current&amp;#39;=&amp;gt;1, &amp;#39;raw&amp;#39;=&amp;gt;1));&#xA;        if(!empty($translations)) {&#xA;            foreach($translations as $tr) {&#xA;                $trid=pll_get_post($post_id, $tr[&amp;#39;slug&amp;#39;]);&#xA;                ?&amp;gt;&amp;lt;li lang=&amp;#34;&amp;lt;?php echo esc_attr($tr[&amp;#39;slug&amp;#39;]);?&amp;gt;&amp;#34;&amp;gt;&amp;lt;?php echo $translation_title[$tr[&amp;#39;slug&amp;#39;]]; ?&amp;gt;&amp;lt;a hreflang=&amp;#34;&amp;lt;?php echo esc_attr($tr[&amp;#39;slug&amp;#39;]);?&amp;gt;&amp;#34; href=&amp;#34;&amp;lt;?php echo esc_url($tr[&amp;#39;url&amp;#39;]);?&amp;gt;&amp;#34; rel=&amp;#34;alternate&amp;#34;&amp;gt;&amp;lt;?php echo get_the_title($trid); ?&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;?php&#xA;            }&#xA;        }&#xA;    }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Instead of porting the old theme, I did build a new one based on &lt;a href=&#34;https://wordpress.org/themes/twentytwelve&#34; title=&#34;Wordpress&amp;#39; Twenty Twelve theme&#34;&gt;WordPress’ Twenty Twelve&lt;/a&gt; updated with my previous header and dark color scheme.&lt;br&gt;&#xA;I also played with a few css3 features for more neon light effects 🙂&lt;/p&gt;&#xA;&lt;p&gt;And here it is !&lt;/p&gt;</description>
			</item>
			<item>
				<title>From gengo to polylang: importing data</title>
				<link>https://silicone.homelinux.org/2014/01/27/from-gengo-to-polylang-importing-data/</link>
				<pubDate>Mon, 27 Jan 2014 23:34:03 +0100</pubDate>
				<guid>https://silicone.homelinux.org/2014/01/27/from-gengo-to-polylang-importing-data/</guid>
				<description>&lt;p&gt;As you might know, my blog is using &lt;a href=&#34;http://silicone.homelinux.org/projects/gengo/&#34;&gt;gengo&lt;/a&gt; to enable translations.&lt;/p&gt;&#xA;&lt;p&gt;But gengo is an old unmaintained plugin (I’m even running a custom version that I recently needed to fix again) so I’d like to migrate away.&lt;/p&gt;&#xA;&lt;p&gt;Recently, I studied the available options (thanks to &lt;a href=&#34;http://codex.wordpress.org/Multilingual_WordPress&#34; title=&#34;Multilingual WordPress&#34; target=&#34;_blank&#34;&gt;Multilingual WordPress&lt;/a&gt; page) and selected &lt;a href=&#34;http://polylang.wordpress.com/&#34; title=&#34;Polylang&#34; target=&#34;_blank&#34;&gt;Polylang&lt;/a&gt;. This one seams to be what Gengo could have been with a rewrite: no extra database tables but using WP3 custom taxonomies. (I can’t find the message but I remember Pixline telling this would be the way to go, so…).&lt;/p&gt;&#xA;&lt;p&gt;Anyway, I started to test Polylang, what it misses compared to Gengo, is the ability to really mix languages on the same page, so it will need some customizations before replacing Gengo here, but it will come.&lt;/p&gt;&#xA;&lt;p&gt;It’s only a few days layer that I found the &lt;a href=&#34;http://wordpress.org/plugins/wpml-to-polylang/&#34; title=&#34;WPML to Polylang&#34; target=&#34;_blank&#34;&gt;WPML to Polylang&lt;/a&gt; plugin.&lt;br&gt;&#xA;This basically triggered the development of &lt;a href=&#34;http://silicone.homelinux.org/git/gengo-to-polylang.git/&#34; title=&#34;Gengo to Polylang&#34; target=&#34;_blank&#34;&gt;Gengo to Polylang&lt;/a&gt; a plugin to import translations informations from Gengo to Polylang.&lt;/p&gt;&#xA;&lt;p&gt;It seams to work… I missed the Site Title and Tagline (but they are no longer translated on my blog so I don’t need it 😕 ) and I did take some shortcut for terms (tags &amp;amp; categories) that are the same in both languages.&lt;br&gt;&#xA;UPDATE 2014-02-04: I fixed that as it caused the tag archive to contain both english and french posts so… also fixed the Title and Tagline part.&lt;/p&gt;&#xA;&lt;p&gt;So if you still have a Gengo powered blog and want to migrate, the code could help you, but don’t just run it blindly, make a backup, setup a test instance and be prepared to hack the code ! You have been warned !&lt;/p&gt;</description>
			</item>
			<item>
				<title>New Projects pages and Gengo update.</title>
				<link>https://silicone.homelinux.org/2010/08/17/new-projects-pages-and-gengo-update/</link>
				<pubDate>Tue, 17 Aug 2010 14:41:37 +0100</pubDate>
				<guid>https://silicone.homelinux.org/2010/08/17/new-projects-pages-and-gengo-update/</guid>
				<description>&lt;p&gt;I’ve been adding pages for my &lt;a href=&#34;http://silicone.homelinux.org/projects/&#34;&gt;Projects&lt;/a&gt;. Previously this kind of data was on &lt;a href=&#34;http://silicone.homelinux.org/trac&#34;&gt;Trac&lt;/a&gt;, but I’ve never been using it actively. And I’m mostly using &lt;a href=&#34;https://silicone.homelinux.org/git/&#34;&gt;git&lt;/a&gt; for my new development instead of subversion.&lt;/p&gt;&#xA;&lt;p&gt;I could have used Trac with git, but for project presentation WordPress pages are good enough.&lt;/p&gt;&#xA;&lt;p&gt;But I wanted to have comments on some pages, which meant a theme update and another Gengo fix. Also I’ve done a big history rewrite by moving my version of gengo to git. If ever Jamie Talbot is really &lt;a href=&#34;http://jamietalbot.com/2010/06/30/do-you-still-want-gengo/&#34;&gt;seriously considering starting development again&lt;/a&gt;. Then I hope he can pick some patches from my version 😉&lt;/p&gt;</description>
			</item>
			<item>
				<title>Mises à jour de WordPress et des plugins</title>
				<link>https://silicone.homelinux.org/2010/02/03/mises-a-jour-de-wordpress-et-des-plugins/</link>
				<pubDate>Wed, 03 Feb 2010 23:23:43 +0100</pubDate>
				<guid>https://silicone.homelinux.org/2010/02/03/mises-a-jour-de-wordpress-et-des-plugins/</guid>
				<description>&lt;p&gt;À la suite des déboires d’hier, je viens de mettre à jours tous mes plugins.&lt;/p&gt;&#xA;&lt;p&gt;Le changement des URI par le plugin Gengo, qui ajoutait les code des langues m’embarquait dans une redirection infinie (en ajoutant des fr+en/ à l’URI) j’ai du le désactiver. Mais ce faisant, j’ai cassé les URI existante de vos marque-pages (si vous en aviez) et surtout de Google…&lt;br&gt;&#xA;Donc &lt;a href=&#34;http://silicone.homelinux.org/trac/changeset/28&#34;&gt;j’ai encore modifié gengo&lt;/a&gt;, maintenant les URI qui se terminent par un code de langue sont redirigé vers l’URI sans.&lt;br&gt;&#xA;Une lecture récente: &lt;a href=&#34;http://www.w3.org/Provider/Style/URI&#34;&gt;Cool URIs don’t change&lt;/a&gt; exprime ce besoin de conserver les URI, ici je redirige, c’est mieux que rien et vous évite le 404 😉&lt;/p&gt;&#xA;&lt;p&gt;J’ai trouvé ce lien sur &lt;a href=&#34;http://petereisentraut.blogspot.com/&#34;&gt;le Blog de Peter Eisentraut&lt;/a&gt;. Je lisait sont article a propos de &lt;a href=&#34;http://petereisentraut.blogspot.com/2010/01/remove-and-purge.html&#34;&gt;Remove et Purge&lt;/a&gt;. Je fut séduit par l’idée, je l’ai même appliqué quelques jours. Puis j’ai lut les commentaires, j’en reste à la méthode &lt;code&gt;l~c&lt;/code&gt; pour crée une vue dans aptitude 😉 . Par le passé, j’utilisais synaptic pour purger les résidus restant…&lt;/p&gt;</description>
			</item>
			<item>
				<title>Mon blog devient bilingue</title>
				<link>https://silicone.homelinux.org/2009/03/21/mon-blog-devient-bilingue/</link>
				<pubDate>Sat, 21 Mar 2009 19:58:08 +0100</pubDate>
				<guid>https://silicone.homelinux.org/2009/03/21/mon-blog-devient-bilingue/</guid>
				<description>&lt;p&gt;Grâce au plug-in &lt;a href=&#34;http://wordpress.org/extend/plugins/gengo/&#34; title=&#34;Gengo&#34;&gt;Gengo&lt;/a&gt; mon blog devient bilingue.&lt;/p&gt;&#xA;&lt;p&gt;Évidement rien n’est jamais simple, Gengo n’est pas encore prêt pour wordpress 2.7 … donc j’ai dû installer la version de développement, reste à voir si ça marche bien !&lt;/p&gt;&#xA;&lt;p&gt;Ce billet va me permettre de tester 😉&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Premier problème, les accents… allez je passe tout en UTF-8, ça marche&lt;/li&gt;&#xA;&lt;li&gt;Bon la date, les catégories et tags ne sont pas traduit dans le post, mais ils le sont en marge… étrange, ça reste une affaire à suivre…&lt;/li&gt;&#xA;&lt;li&gt;Toutes les catégories et les tags doivent être traduits, sinon certains endroits ne sont pas remplis 🙁&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
			</item>
	</channel>
</rss>
