<?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>HagelBlog</title>
	<atom:link href="http://www.hagelnx.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.hagelnx.com</link>
	<description>An American in Bulgaria</description>
	<lastBuildDate>Mon, 17 May 2010 11:37:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Maven-shade-plugin and Spring: Unable to locate Spring NamespaceHandler for XML schema namespace</title>
		<link>http://www.hagelnx.com/prog/814</link>
		<comments>http://www.hagelnx.com/prog/814#comments</comments>
		<pubDate>Mon, 17 May 2010 11:30:51 +0000</pubDate>
		<dc:creator>Kevin  Hagel</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://www.hagelnx.com/?p=814</guid>
		<description><![CDATA[I&#8217;m using the maven-shade-plugin to build a standalone spring-based java application. Have you ever seen this complaint from spring: Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace &#91;http://www.springframework.org/schema/util&#93; Well, here&#8217;s the thing. Inside all those spring jars, in the META-INF directory you&#8217;ll see a file META-INF/spring.handlers and another file [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m using the <a href="http://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html" target="_blank">maven-shade-plugin</a> to build a standalone spring-based java application.<br />
Have you ever seen this complaint from spring:</p>
<div class="codecolorer-container bash default" style="border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to <span style="color: #c20cb9; font-weight: bold;">locate</span> Spring NamespaceHandler <span style="color: #000000; font-weight: bold;">for</span> XML schema namespace <span style="color: #7a0874; font-weight: bold;">&#91;</span>http:<span style="color: #000000; font-weight: bold;">//</span>www.springframework.org<span style="color: #000000; font-weight: bold;">/</span>schema<span style="color: #000000; font-weight: bold;">/</span>util<span style="color: #7a0874; font-weight: bold;">&#93;</span></div></div>
<p>Well, here&#8217;s the thing.  Inside all those spring jars, in the META-INF directory you&#8217;ll see a file</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">META-INF/spring.handlers</div></div>
<p>and another file</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">META-INF/spring.schemas</div></div>
<p><span id="more-814"></span></p>
<p>Everyone of the spring jars, spring-core and spring-context and spring-aop and so on contains a directory META-INF which contains spring.handlers and spring.schemas files.  Most or all of them also have the particular schema file contained as well &#8212; this lets you have your spring contexts validated even if you&#8217;re running offline.</p>
<p>Here&#8217;s what the spring.schemas file looks like if you open up spring-aop-3.0.2.RELEASE.jar and have a look:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">http\://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd<br />
http\://www.springframework.org/schema/aop/spring-aop-2.5.xsd=org/springframework/aop/config/spring-aop-2.5.xsd<br />
http\://www.springframework.org/schema/aop/spring-aop-3.0.xsd=org/springframework/aop/config/spring-aop-3.0.xsd<br />
http\://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-3.0.xsd</div></div>
<p>Notice you do NOT see anything about spring-context or spring-util or spring-task &#8230; and so on.</p>
<p>Now the maven-shade-plugin basically expands the jars and rewrites them into the work directory before jarring everything back up again.  This normally works fine when you don&#8217;t have naming and pathing COLLISIONS, like you do with these schema files.  So whichever spring jar was processed last by maven-shade will have its META-INF/* contents written into the final jar you&#8217;re creating, overwriting any other content with the same name.</p>
<p>So if you&#8217;re using a spring context file that looks something like this:</p>
<div class="codecolorer-container xml default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;beans</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.springframework.org/schema/beans&quot;</span></span><br />
<span style="color: #009900;"> &nbsp;<span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span></span><br />
<span style="color: #009900;"> &nbsp;<span style="color: #000066;">xmlns:context</span>=<span style="color: #ff0000;">&quot;http://www.springframework.org/schema/context&quot;</span></span><br />
<span style="color: #009900;"> &nbsp;<span style="color: #000066;">xmlns:util</span>=<span style="color: #ff0000;">&quot;http://www.springframework.org/schema/util&quot;</span></span><br />
<span style="color: #009900;"> &nbsp;<span style="color: #000066;">xsi:schemaLocation</span>=<span style="color: #ff0000;">&quot;http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd</span><br />
<span style="color: #009900;"> &nbsp; &nbsp;http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd</span><br />
<span style="color: #009900;"> &nbsp; &nbsp;http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;context</span> :annotation-config <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
<br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;util</span> :properties <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;defaultProperties&quot;</span> </span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">location</span>=<span style="color: #ff0000;">&quot;classpath:/spring/defaultScraperExecution.properties&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
<br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/beans<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<p>&#8230;you will get the complaint mentioned in the title of this blog entry.   Spring can&#8217;t find the namespace handler for &#8220;util&#8221;, because it is not mentioned in the META-INF/spring.schemas that result in the final product.</p>
<p>Here&#8217;s the solution &#8211; you need to take advantage of the example in the <a href="http://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html" target="_blank" title="Will open in a new window/tab">maven-shade-plugin</a> page and do this in your configuration section:</p>
<div class="codecolorer-container xml default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;transformers<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; <span style="color: #808080; font-style: italic;">&lt;!-- </span><br />
<span style="color: #808080; font-style: italic;"> &nbsp;must be SURE to do this with both spring.handlers and spring.schemas. otherwise</span><br />
<span style="color: #808080; font-style: italic;"> &nbsp;you won't be able to use them in the spring config files. </span><br />
<span style="color: #808080; font-style: italic;"> &nbsp; --&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;transformer</span> <span style="color: #000066;">implementation</span>=<span style="color: #ff0000;">&quot;org.apache.maven.plugins.shade.resource.AppendingTransformer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;resource<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>META-INF/spring.handlers<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/resource<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/transformer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;transformer</span> <span style="color: #000066;">implementation</span>=<span style="color: #ff0000;">&quot;org.apache.maven.plugins.shade.resource.AppendingTransformer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;resource<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>META-INF/spring.schemas<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/resource<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/transformer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/transformers<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<p>The maven-shade-plugin will append the contents of all META-INF/spring.schemas and META-INF/spring.handlers files it finds during the expansion.</p>
<p><a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.hagelnx.com%2Fprog%2F814&amp;linkname=Maven-shade-plugin%20and%20Spring%3A%20Unable%20to%20locate%20Spring%20NamespaceHandler%20for%20XML%20schema%20namespace" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.hagelnx.com/wordpress/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.hagelnx.com%2Fprog%2F814&amp;linkname=Maven-shade-plugin%20and%20Spring%3A%20Unable%20to%20locate%20Spring%20NamespaceHandler%20for%20XML%20schema%20namespace"><img src="http://www.hagelnx.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.hagelnx.com/prog/814/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Burgas Flora 2010</title>
		<link>http://www.hagelnx.com/bulg/800</link>
		<comments>http://www.hagelnx.com/bulg/800#comments</comments>
		<pubDate>Thu, 29 Apr 2010 09:00:32 +0000</pubDate>
		<dc:creator>Kevin  Hagel</dc:creator>
				<category><![CDATA[Bulgaria]]></category>
		<category><![CDATA[Burgas]]></category>
		<category><![CDATA[Flora]]></category>
		<category><![CDATA[Sea Garden]]></category>

		<guid isPermaLink="false">http://www.hagelnx.com/?p=800</guid>
		<description><![CDATA[It&#8217;s time for the Flora in Burgas once again. Zlatina and I are going to spend some time in the sea garden visiting the exhibition. Pictures to come &#8230; View all Get your own]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s time for the Flora in Burgas once again.  Zlatina and I are going to spend some time in the sea garden visiting the exhibition.  Pictures to come &#8230;</p>
<div style="width:600px;font-family:arial,sans-serif;font-size:13px;">
<div><embed type="application/x-shockwave-flash" src="http://picasaweb.google.com/s/c/bin/slideshow.swf" width="600" height="400" flashvars="host=picasaweb.google.com&#038;captions=1&#038;hl=en_US&#038;feat=flashalbum&#038;RGB=0x000000&#038;feed=http%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2Fkhote14%2Falbumid%2F5465563458654633793%3Falt%3Drss%26kind%3Dphoto%26hl%3Den_US" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></div>
<p><span style="float:left;"><a href="http://picasaweb.google.com/khote14/20100429?feat=flashalbum" style="color:#3964c2">View all</a></span>
<div style="text-align:right;"><a href="http://picasaweb.google.com/lh/getEmbed?feat=flashalbum" style="color:#3964c2">Get your own</a></div>
</div>
<p><a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.hagelnx.com%2Fbulg%2F800&amp;linkname=Burgas%20Flora%202010" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.hagelnx.com/wordpress/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.hagelnx.com%2Fbulg%2F800&amp;linkname=Burgas%20Flora%202010"><img src="http://www.hagelnx.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.hagelnx.com/bulg/800/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spring cat in tree flowers</title>
		<link>http://www.hagelnx.com/photography/798</link>
		<comments>http://www.hagelnx.com/photography/798#comments</comments>
		<pubDate>Tue, 20 Apr 2010 11:18:06 +0000</pubDate>
		<dc:creator>Kevin  Hagel</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[Burgas]]></category>

		<guid isPermaLink="false">http://www.hagelnx.com/?p=798</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter" title="Spring cat in tree flowers" src="http://www.hagelnx.com/gallery2/d/48887-2/IMG_5951.JPG" alt="" width="560" height="420" /></p>
<p><a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.hagelnx.com%2Fphotography%2F798&amp;linkname=Spring%20cat%20in%20tree%20flowers" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.hagelnx.com/wordpress/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.hagelnx.com%2Fphotography%2F798&amp;linkname=Spring%20cat%20in%20tree%20flowers"><img src="http://www.hagelnx.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.hagelnx.com/photography/798/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Spring &#8230;?</title>
		<link>http://www.hagelnx.com/bulg/793</link>
		<comments>http://www.hagelnx.com/bulg/793#comments</comments>
		<pubDate>Tue, 16 Mar 2010 19:54:12 +0000</pubDate>
		<dc:creator>Kevin  Hagel</dc:creator>
				<category><![CDATA[Bulgaria]]></category>

		<guid isPermaLink="false">http://www.hagelnx.com/?p=793</guid>
		<description><![CDATA[Oh, waiting for spring. When will the storks get here? It&#8217;s still at or near freezing at night. Spring, where for art thou?]]></description>
			<content:encoded><![CDATA[<p>Oh, waiting for spring.  When will the storks get here?  It&#8217;s still at or near freezing at night.  Spring, where for art thou?</p>
<p><a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.hagelnx.com%2Fbulg%2F793&amp;linkname=Spring%20%26%238230%3B%3F" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.hagelnx.com/wordpress/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.hagelnx.com%2Fbulg%2F793&amp;linkname=Spring%20%26%238230%3B%3F"><img src="http://www.hagelnx.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.hagelnx.com/bulg/793/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Special day</title>
		<link>http://www.hagelnx.com/uncategorized/792</link>
		<comments>http://www.hagelnx.com/uncategorized/792#comments</comments>
		<pubDate>Sun, 07 Mar 2010 12:37:39 +0000</pubDate>
		<dc:creator>Kevin  Hagel</dc:creator>
				<category><![CDATA[Burgas]]></category>

		<guid isPermaLink="false">http://www.hagelnx.com/bulg/burgas-bulg/792</guid>
		<description><![CDATA[Chestita razhden den, Zlatina, Happy birthday!]]></description>
			<content:encoded><![CDATA[<p>Chestita razhden den, Zlatina, Happy birthday!</p>
<p><a href="http://www.hagelnx.com/wordpress/wp-content/uploads/2010/03/p_1600_1200_276C3EAC-28A3-4CD7-9D4F-5D82502D5172.jpeg"><img src="http://www.hagelnx.com/wordpress/wp-content/uploads/2010/03/p_1600_1200_276C3EAC-28A3-4CD7-9D4F-5D82502D5172.jpeg" alt="" class="alignnone size-full" /></a></p>
<p><a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.hagelnx.com%2Funcategorized%2F792&amp;linkname=Special%20day" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.hagelnx.com/wordpress/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.hagelnx.com%2Funcategorized%2F792&amp;linkname=Special%20day"><img src="http://www.hagelnx.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.hagelnx.com/uncategorized/792/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gettext &#8211; .po vs .pot</title>
		<link>http://www.hagelnx.com/prog/782</link>
		<comments>http://www.hagelnx.com/prog/782#comments</comments>
		<pubDate>Tue, 02 Feb 2010 09:57:08 +0000</pubDate>
		<dc:creator>Kevin  Hagel</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.hagelnx.com/?p=782</guid>
		<description><![CDATA[What is the difference between a .po and .pot file? Here&#8217;s a quote from the GNU gettext utilities page: After preparing the sources, the programmer creates a PO template file. This section explains how to use xgettext for this purpose. xgettext creates a file named domainname.po. You should then rename it to domainname.pot. (Why doesn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>What is the difference between a .po and .pot file?</p>
<p>Here&#8217;s a quote from the <a href="http://www.gnu.org/software/gettext/manual/gettext.html" target="_blank">GNU gettext utilities page</a>:</p>
<blockquote><p>After preparing the sources, the programmer creates a PO template file. This section explains how to use xgettext for this purpose.</p>
<p>xgettext creates a file named domainname.po. You should then rename it to domainname.pot. (Why doesn&#8217;t xgettext create it under the name domainname.pot right away? The answer is: for historical reasons. When xgettext was specified, the distinction between a PO file and PO file template was fuzzy, and the suffix ‘.pot’ wasn&#8217;t in use at that time.) </p></blockquote>
<p>So that&#8217;s it.  It&#8217;s the same file, with a different name.  Just thought I&#8217;d mention that, considering how much time I pissed off trying to find the answer!</p>
<p>[edit]<br />
It looks like WordPress sees this a little differently.  the POT file, the &#8220;PO&#8221; Template, is the raw output from the xgettext, untranslated.  the PO file is the text-editable and edited pot file with the translations.  the MO file is built with msgfmt (among others) and is what is actually used by php&#8217;s gettext.</p>
<p><a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.hagelnx.com%2Fprog%2F782&amp;linkname=gettext%20%26%238211%3B%20.po%20vs%20.pot" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.hagelnx.com/wordpress/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.hagelnx.com%2Fprog%2F782&amp;linkname=gettext%20%26%238211%3B%20.po%20vs%20.pot"><img src="http://www.hagelnx.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.hagelnx.com/prog/782/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internationalization, Localization, gettext, php &#8211; a beginning.</title>
		<link>http://www.hagelnx.com/prog/753</link>
		<comments>http://www.hagelnx.com/prog/753#comments</comments>
		<pubDate>Fri, 29 Jan 2010 10:32:54 +0000</pubDate>
		<dc:creator>Kevin  Hagel</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.hagelnx.com/?p=753</guid>
		<description><![CDATA[I&#8217;m beginning a new effort these days, that of internationalisation and localisation of the php coding I&#8217;ve been doing lately. GNU &#8216;gettext&#8217; Utilities These docs for gettext are C-oriented, but the associated tools such as xgettext are easily used by PHP, so let&#8217;s not get too excited about the C. And I&#8217;m going to assume [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m beginning a new effort these days, that of internationalisation and localisation of the php coding I&#8217;ve been doing lately.</p>
<p><a href="http://www.gnu.org/software/gettext/manual/gettext.html" target="_blank">GNU &#8216;gettext&#8217; Utilities</a></p>
<p>These docs for gettext are C-oriented, but the associated tools such as xgettext are easily used by PHP, so let&#8217;s not get too excited about the C.<br />
And I&#8217;m going to assume you have installed GNU&#8217;s gettext on your system.  I&#8217;m pretty sure it arrives by default with your ubuntu or other linux installation.  Mac and Windows you&#8217;re going to have to find for yourself <img src='http://www.hagelnx.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Edited:  download <a href="http://gnuwin32.sourceforge.net/downlinks/gettext.php" target="_blank">GetText for Windows here</a></p>
<p>There&#8217;s also a lot of emacs crap in this doc, which I&#8217;m also going to ignore.  We&#8217;re going to use tools like poedit, gtranslator for what we need &#8230; coming posts.</p>
<p>on my ubuntu 9.10 box the following command installs the php-gettext stuff in /usr/share/php/php-gettext</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> php-gettext</div></div>
<p>and includes these three files:</p>
<ul>
<li>gettext.inc</li>
<li>gettext.php</li>
<li>streams.php</li>
</ul>
<p>I&#8217;m not going to deal with the internals of these files here in this post.</p>
<p>What I do is copy these into my working project somewhere, say in a subdirectory named &#8220;library&#8221;, &#8220;lib&#8221;, &#8220;i18n&#8221; &#8230; etc.  I&#8217;m going to call it ./library/i18n just for this.</p>
<p><strong>.po, .pot, .mo files &#8211; what are these?</strong><br />
<a href="http://www.gnu.org/software/gettext/manual/gettext.html#Files" target="_blank"></p>
<p>http://www.gnu.org/software/gettext/manual/gettext.html#Files</a></p>
<p>That&#8217;s about all for now, sorry I couldn&#8217;t be more helpful in this post.  This is just the setup stuff I&#8217;ve done for my new entry into this world of Internationalisation (i18n), Localisation (l10n), and Native Language Support (NLS) &#8212; see <a href="http://www.gnu.org/software/gettext/manual/gettext.html#Concepts" target="_blank">Concepts</a>.</p>
<p><a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.hagelnx.com%2Fprog%2F753&amp;linkname=Internationalization%2C%20Localization%2C%20gettext%2C%20php%20%26%238211%3B%20a%20beginning." title="Facebook" rel="nofollow" target="_blank"><img src="http://www.hagelnx.com/wordpress/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.hagelnx.com%2Fprog%2F753&amp;linkname=Internationalization%2C%20Localization%2C%20gettext%2C%20php%20%26%238211%3B%20a%20beginning."><img src="http://www.hagelnx.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.hagelnx.com/prog/753/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Anniversary Not the 22nd</title>
		<link>http://www.hagelnx.com/travel/750</link>
		<comments>http://www.hagelnx.com/travel/750#comments</comments>
		<pubDate>Fri, 22 Jan 2010 13:33:59 +0000</pubDate>
		<dc:creator>Kevin  Hagel</dc:creator>
				<category><![CDATA[Travel]]></category>
		<category><![CDATA[Burgas]]></category>

		<guid isPermaLink="false">http://www.hagelnx.com/?p=750</guid>
		<description><![CDATA[I had the day wrong &#8211; it&#39;s not the 22nd of January, it was the 14th of January.&#160; I looked in my journal and realized that the 14th of January, 2008 was the first day I stepped foot in Bulgaria. That&#39;s right.&#160; I remember getting on the plane in Madison, Wisconsin, sometime in the afternoon [...]]]></description>
			<content:encoded><![CDATA[<p>I had the day wrong &#8211; it&#39;s not the 22nd of January, it was the 14th of January.&nbsp; I looked in my journal and realized that the 14th of January, 2008 was the first day I stepped foot in Bulgaria.</p>
<p>That&#39;s right.&nbsp; I remember getting on the plane in Madison, Wisconsin, sometime in the afternoon of January 13th.&nbsp; 22 hours later my flight from Frankfurt Germany landed in Sofia, in a blizzard!<br />
	Nedda and Ivan were there to meet me.&nbsp; We followed a couple of snow plows clear across Bulgaria, until we turned south to Burgas.</p>
<p>So anyway, here we are, here I am.&nbsp; Tonight Zlatina and I are going to entertain a little, we invited people over from her school, and I invited everybody who had anything to do with my being here.&nbsp; We&#39;ll have a nice social time, with some ros&eacute; and white wine chilled on the balcony, some red wine, and stuff like that.</p>
<p>It may be that some of the people won&#39;t be able to make it.&nbsp; Folks here in southeastern Bulgaria are not used to the kind of cold we&#39;re having here this past week &#8211; many engines won&#39;t start.&nbsp; Deep snow is still all over the place, the roads have been turned into glaciers, and it&#39;s hard freezing every night.</p>
<p>But we&#39;ll try.&nbsp; Happy Anniversary Kevin.</p>
<p>Oh, by the way, the forecast for tomorrow calls for more heavy snow.</p>
<p><a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.hagelnx.com%2Ftravel%2F750&amp;linkname=Anniversary%20Not%20the%2022nd" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.hagelnx.com/wordpress/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.hagelnx.com%2Ftravel%2F750&amp;linkname=Anniversary%20Not%20the%2022nd"><img src="http://www.hagelnx.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.hagelnx.com/travel/750/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Heavy snow in Burgas</title>
		<link>http://www.hagelnx.com/bulg/729</link>
		<comments>http://www.hagelnx.com/bulg/729#comments</comments>
		<pubDate>Tue, 19 Jan 2010 23:24:58 +0000</pubDate>
		<dc:creator>Kevin  Hagel</dc:creator>
				<category><![CDATA[Bulgaria]]></category>
		<category><![CDATA[Bulgarian]]></category>
		<category><![CDATA[Burgas]]></category>
		<category><![CDATA[Weather]]></category>

		<guid isPermaLink="false">http://www.hagelnx.com/?p=729</guid>
		<description><![CDATA[Picasaweb Gallery Photos &#160;It started snowing Monday night about 6pm, and continued until tonight (Tuesday) about 8pm.&#160; Heavy snow, in fact all the people I talked to here today in Burgas say it&#39;s the heaviest snow they&#39;ve ever seen here. I took a nice walk from our new place on Rilska street, down to Bogoridi, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://picasaweb.google.com/khote14/20100119HeavyBurgasSnow?feat=directlink" target="_blank">Picasaweb Gallery Photos</a></p>
<p>&nbsp;It started snowing Monday night about 6pm, and continued until tonight (Tuesday) about 8pm.&nbsp; Heavy snow, in fact all the people I talked to here today in Burgas say it&#39;s the heaviest snow they&#39;ve ever seen here.</p>
<p>I took a nice walk from our new place on Rilska street, down to Bogoridi, to the Sea Garden &#8230;. out to the end of the pier, on to the beach &#8230; back through the sea garden.&nbsp; You can see the pictures below in the embedded picasweb link.</p>
<p>What a great day it&#39;s been.&nbsp; It reminds me so much of living in Madison, Wisconsin in the US.&nbsp; Sure, it&#39;s not quite as cold here &#8211; just a few degrees below freezing, and it only snows like this once a decade here where it snows like this repeatedly throughout the winter in Wisconsin &#8211; but hey, it does remind me of the past three winters I spent in Madison, and I did like the winters there for some weird reason <img src='http://www.hagelnx.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><embed flashvars="host=picasaweb.google.com&amp;hl=en_US&amp;feat=flashalbum&amp;RGB=0x000000&amp;feed=http%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2Fkhote14%2Falbumid%2F5428582103253198401%3Falt%3Drss%26kind%3Dphoto%26hl%3Den_US" height="400" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://picasaweb.google.com/s/c/bin/slideshow.swf" type="application/x-shockwave-flash" width="600"></embed></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><object height="505" width="640"><param name="movie" value="http://www.youtube.com/v/KvxiPbfjdD4&amp;hl=en_US&amp;fs=1&amp;rel=0" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><embed allowfullscreen="true" allowscriptaccess="always" height="505" src="http://www.youtube.com/v/KvxiPbfjdD4&amp;hl=en_US&amp;fs=1&amp;rel=0" type="application/x-shockwave-flash" width="640"></embed></object></p>
<p><a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.hagelnx.com%2Fbulg%2F729&amp;linkname=Heavy%20snow%20in%20Burgas" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.hagelnx.com/wordpress/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.hagelnx.com%2Fbulg%2F729&amp;linkname=Heavy%20snow%20in%20Burgas"><img src="http://www.hagelnx.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.hagelnx.com/bulg/729/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>in Varna for new year&#8217;s celebration</title>
		<link>http://www.hagelnx.com/bulg/722</link>
		<comments>http://www.hagelnx.com/bulg/722#comments</comments>
		<pubDate>Wed, 30 Dec 2009 21:41:13 +0000</pubDate>
		<dc:creator>Kevin  Hagel</dc:creator>
				<category><![CDATA[Bulgaria]]></category>
		<category><![CDATA[Travel]]></category>

		<guid isPermaLink="false">http://www.hagelnx.com/?p=722</guid>
		<description><![CDATA[We&#39;re staying at the five-star Grand Hotel Dimyat for a few days, here to enjoy some time with Zlatina&#39;s family and some old friends, and to generally enjoy the city of Varna for the new year celebrations.&#160; I guess I have to say that Varna is a prettier city than Burgas, a larger city.&#160; Certainly [...]]]></description>
			<content:encoded><![CDATA[<p>We&#39;re staying at the five-star <a href="http://www.grandhoteldimyat.net/" target="_blank">Grand Hotel Dimyat</a> for a few days, here to enjoy some time with Zlatina&#39;s family and some old friends, and to generally enjoy the city of Varna for the new year celebrations.&nbsp;</p>
<p>I guess I have to say that Varna is a prettier city than Burgas, a larger city.&nbsp; Certainly more attractive than Sofia &#8230; in fact it kind of reminds me of Seattle, only without all the rain all the time.&nbsp; The city puts up lots of christmas lights, keeps them on through the new year.&nbsp; I hope to go out tomorrow night and take some slow-shutter speed photos to show you.</p>
<p>Well, I ate too much at dinner again, seems it&#39;s the time of year for that.&nbsp; Good night, and have a happy new year of if you can.</p>
<p><a href="http://picasaweb.google.com/khote14/20100101?feat=directlink" target="_blank">Link to Photos from our Varna vacation</a></p>
<p><a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.hagelnx.com%2Fbulg%2F722&amp;linkname=in%20Varna%20for%20new%20year%26%238217%3Bs%20celebration" title="Facebook" rel="nofollow" target="_blank"><img src="http://www.hagelnx.com/wordpress/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.hagelnx.com%2Fbulg%2F722&amp;linkname=in%20Varna%20for%20new%20year%26%238217%3Bs%20celebration"><img src="http://www.hagelnx.com/wordpress/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.hagelnx.com/bulg/722/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
