<?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"
	>
<channel>
	<title>Comments on: Translating your Python/PyGTK application</title>
	<atom:link href="http://www.learningpython.com/2006/12/03/translating-your-pythonpygtk-application/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.learningpython.com/2006/12/03/translating-your-pythonpygtk-application/</link>
	<description>one man's journey into python...</description>
	<pubDate>Sun, 06 Jul 2008 23:41:49 +0000</pubDate>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>By: Charles Merriam</title>
		<link>http://www.learningpython.com/2006/12/03/translating-your-pythonpygtk-application/#comment-63019</link>
		<dc:creator>Charles Merriam</dc:creator>
		<pubDate>Wed, 27 Feb 2008 00:34:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningpython.com/?p=48#comment-63019</guid>
		<description>First, thank you for the excellent write-up.  Very few examples of using internationalization and localization exist for Python.

Second, many operating systems, including Ubuntu, fail to explicitly set the LANGUAGE variable.  This leads to many non-working pieces of code.  Your solution is one of the few that addresses this correctly.

Third, the most simple usage of "from gettext import gettext.gettext as _" is often used as a temporary solution between coding your Python program and localizing it.  Alternately, some put in the placeholder "def _(str): str" to allow coding in internationalization before beginning it.

Finally, could you explain the odd issues of making a translation for a language.  That is, will a locale of "de_DE" grab the "de" translation if there is no "de_DE" directory?

Great article!</description>
		<content:encoded><![CDATA[<p>First, thank you for the excellent write-up.  Very few examples of using internationalization and localization exist for Python.</p>
<p>Second, many operating systems, including Ubuntu, fail to explicitly set the LANGUAGE variable.  This leads to many non-working pieces of code.  Your solution is one of the few that addresses this correctly.</p>
<p>Third, the most simple usage of &#8220;from gettext import gettext.gettext as _&#8221; is often used as a temporary solution between coding your Python program and localizing it.  Alternately, some put in the placeholder &#8220;def _(str): str&#8221; to allow coding in internationalization before beginning it.</p>
<p>Finally, could you explain the odd issues of making a translation for a language.  That is, will a locale of &#8220;de_DE&#8221; grab the &#8220;de&#8221; translation if there is no &#8220;de_DE&#8221; directory?</p>
<p>Great article!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eiwot</title>
		<link>http://www.learningpython.com/2006/12/03/translating-your-pythonpygtk-application/#comment-52194</link>
		<dc:creator>Eiwot</dc:creator>
		<pubDate>Mon, 12 Nov 2007 09:31:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningpython.com/?p=48#comment-52194</guid>
		<description>Great !!!</description>
		<content:encoded><![CDATA[<p>Great !!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kopfgeldjaeger</title>
		<link>http://www.learningpython.com/2006/12/03/translating-your-pythonpygtk-application/#comment-49014</link>
		<dc:creator>Kopfgeldjaeger</dc:creator>
		<pubDate>Tue, 16 Oct 2007 20:21:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningpython.com/?p=48#comment-49014</guid>
		<description>Hello! Your code (example code in gunzip archive) does not really work for me as it should. But that's not that bad, because I know have a very short solution for Python+PyGTK+Gettext+Glade:

[codelang="python"]# 

APP = "gvdown"
DIR = "po"

gtk.glade.bindtextdomain(APP, DIR)
gtk.glade.textdomain(APP)

# 
greetings</description>
		<content:encoded><![CDATA[<p>Hello! Your code (example code in gunzip archive) does not really work for me as it should. But that&#8217;s not that bad, because I know have a very short solution for Python+PyGTK+Gettext+Glade:</p>
<p>[codelang="python"]# </p>
<p>APP = &#8220;gvdown&#8221;<br />
DIR = &#8220;po&#8221;</p>
<p>gtk.glade.bindtextdomain(APP, DIR)<br />
gtk.glade.textdomain(APP)</p>
<p>#<br />
greetings</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JulioBiason.Net</title>
		<link>http://www.learningpython.com/2006/12/03/translating-your-pythonpygtk-application/#comment-48653</link>
		<dc:creator>JulioBiason.Net</dc:creator>
		<pubDate>Fri, 12 Oct 2007 00:34:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningpython.com/?p=48#comment-48653</guid>
		<description>[...] Information extracted from this page. [...]</description>
		<content:encoded><![CDATA[<p>[...] Information extracted from this page. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nano</title>
		<link>http://www.learningpython.com/2006/12/03/translating-your-pythonpygtk-application/#comment-46526</link>
		<dc:creator>Nano</dc:creator>
		<pubDate>Fri, 21 Sep 2007 16:57:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningpython.com/?p=48#comment-46526</guid>
		<description>Ahh, of course ... thanks a lot.</description>
		<content:encoded><![CDATA[<p>Ahh, of course &#8230; thanks a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: selsine</title>
		<link>http://www.learningpython.com/2006/12/03/translating-your-pythonpygtk-application/#comment-45222</link>
		<dc:creator>selsine</dc:creator>
		<pubDate>Mon, 10 Sep 2007 17:23:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningpython.com/?p=48#comment-45222</guid>
		<description>Hi Nano,

You are using the gettext() function incorrectly, you need to only pass it text instead of text and the button.

Try this:

[code lang="python"]
self.button1 = self.wTree.get_widget(”button1″)
tooltips.set_tip(self.button1, _(“Configure the Bash”))
[/code]

Also remember that if you are configuring the tips in Glade the translation should already be taken care of.</description>
		<content:encoded><![CDATA[<p>Hi Nano,</p>
<p>You are using the gettext() function incorrectly, you need to only pass it text instead of text and the button.</p>
<p>Try this:</p>
<div class="hl-surround" ><div class="hl-main"><pre><span class="hl-identifier">self</span><span class="hl-default">.</span><span class="hl-identifier">button1</span><span class="hl-default"> = </span><span class="hl-identifier">self</span><span class="hl-default">.</span><span class="hl-identifier">wTree</span><span class="hl-default">.</span><span class="hl-identifier">get_widget</span><span class="hl-brackets">(</span><span class="hl-code">”</span><span class="hl-identifier">button1</span><span class="hl-code">″</span><span class="hl-brackets">)
</span><span class="hl-identifier">tooltips</span><span class="hl-default">.</span><span class="hl-identifier">set_tip</span><span class="hl-brackets">(</span><span class="hl-identifier">self</span><span class="hl-code">.</span><span class="hl-identifier">button1</span><span class="hl-code">, </span><span class="hl-identifier">_</span><span class="hl-brackets">(</span><span class="hl-code">“</span><span class="hl-identifier">Configure the Bash</span><span class="hl-code">”</span><span class="hl-brackets">))</span></pre></div></div>
<p>Also remember that if you are configuring the tips in Glade the translation should already be taken care of.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nano</title>
		<link>http://www.learningpython.com/2006/12/03/translating-your-pythonpygtk-application/#comment-45210</link>
		<dc:creator>Nano</dc:creator>
		<pubDate>Mon, 10 Sep 2007 15:58:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningpython.com/?p=48#comment-45210</guid>
		<description>hi, cool article, but how to translate tooltips?

I have the following:

tooltips = gtk.Tooltips()

self.button1 = self.wTree.get_widget("button1")
tooltips.set_tip(_(self.button1, "Configure the Bash"))

but then i start the app i get:

Traceback (most recent call last):
  File "/usr/bin/nix-style.real", line 109, in ?
    hwg = NixStyleTen()
  File "/usr/bin/nix-style.real", line 67, in __init__
    tooltips.set_tip(_(button1, "Configure the Bash"))
TypeError: gettext() takes exactly 2 arguments (3 given)

i got no clue</description>
		<content:encoded><![CDATA[<p>hi, cool article, but how to translate tooltips?</p>
<p>I have the following:</p>
<p>tooltips = gtk.Tooltips()</p>
<p>self.button1 = self.wTree.get_widget(&#8221;button1&#8243;)<br />
tooltips.set_tip(_(self.button1, &#8220;Configure the Bash&#8221;))</p>
<p>but then i start the app i get:</p>
<p>Traceback (most recent call last):<br />
  File &#8220;/usr/bin/nix-style.real&#8221;, line 109, in ?<br />
    hwg = NixStyleTen()<br />
  File &#8220;/usr/bin/nix-style.real&#8221;, line 67, in __init__<br />
    tooltips.set_tip(_(button1, &#8220;Configure the Bash&#8221;))<br />
TypeError: gettext() takes exactly 2 arguments (3 given)</p>
<p>i got no clue</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: selsine</title>
		<link>http://www.learningpython.com/2006/12/03/translating-your-pythonpygtk-application/#comment-44235</link>
		<dc:creator>selsine</dc:creator>
		<pubDate>Tue, 04 Sep 2007 14:12:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningpython.com/?p=48#comment-44235</guid>
		<description>Hi Lars,

Feel free to use the code, in fact I'm glad that people are using it in there programs, makes me feel useful!

If you want to do anything for me you could mention my name: Mark Mruss and my blog: www.learningpython.com

That would be very cool!

Good luck!</description>
		<content:encoded><![CDATA[<p>Hi Lars,</p>
<p>Feel free to use the code, in fact I&#8217;m glad that people are using it in there programs, makes me feel useful!</p>
<p>If you want to do anything for me you could mention my name: Mark Mruss and my blog: <a href="http://www.learningpython.com" rel="nofollow">http://www.learningpython.com</a></p>
<p>That would be very cool!</p>
<p>Good luck!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lars Friedrichs</title>
		<link>http://www.learningpython.com/2006/12/03/translating-your-pythonpygtk-application/#comment-43627</link>
		<dc:creator>Lars Friedrichs</dc:creator>
		<pubDate>Fri, 31 Aug 2007 19:42:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningpython.com/?p=48#comment-43627</guid>
		<description>Hi,

thanks for this nice tut. I shamelessly cut'n'pasted the needed python code into my project BlueProximity at http://blueproximity.sourceforge.net which I hope is OK to you. You will get credits in the Changelog as being helpful with the translation infrastructure if that is alright with you. Please mail me for details.

Bye
Lars</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>thanks for this nice tut. I shamelessly cut&#8217;n'pasted the needed python code into my project BlueProximity at <a href="http://blueproximity.sourceforge.net" rel="nofollow">http://blueproximity.sourceforge.net</a> which I hope is OK to you. You will get credits in the Changelog as being helpful with the translation infrastructure if that is alright with you. Please mail me for details.</p>
<p>Bye<br />
Lars</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: myspacetotal</title>
		<link>http://www.learningpython.com/2006/12/03/translating-your-pythonpygtk-application/#comment-41864</link>
		<dc:creator>myspacetotal</dc:creator>
		<pubDate>Sun, 19 Aug 2007 15:37:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningpython.com/?p=48#comment-41864</guid>
		<description>&lt;strong&gt;myspacetotal&lt;/strong&gt;

Interesting Article.</description>
		<content:encoded><![CDATA[<p><strong>myspacetotal</strong></p>
<p>Interesting Article.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
