<?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/"
		>
<channel>
	<title>Comments on: Automatically localize your nibs when building</title>
	<atom:link href="http://developer.casgrain.com/?feed=rss2&#038;p=94" rel="self" type="application/rss+xml" />
	<link>http://developer.casgrain.com/?p=94</link>
	<description>Helping you write better Mac software</description>
	<lastBuildDate>Tue, 20 Jul 2010 01:46:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Philippe</title>
		<link>http://developer.casgrain.com/?p=94&#038;cpage=1#comment-9098</link>
		<dc:creator>Philippe</dc:creator>
		<pubDate>Sat, 22 May 2010 00:23:16 +0000</pubDate>
		<guid isPermaLink="false">http://developer.casgrain.com/?p=94#comment-9098</guid>
		<description>&lt;a href=&quot;#comment-9090&quot; rel=&quot;nofollow&quot;&gt;@Ferris Gabriel &lt;/a&gt; 

Sure, you could only have one nib and translate everything in strings. That&#039;s kind of what Wil Shipley does.

Or you could have no nib too. It&#039;s really up to you to weigh the pros and the cons. I like nibs, other people, not so much.</description>
		<content:encoded><![CDATA[<p><a href="#comment-9090" rel="nofollow">@Ferris Gabriel </a> </p>
<p>Sure, you could only have one nib and translate everything in strings. That&#8217;s kind of what Wil Shipley does.</p>
<p>Or you could have no nib too. It&#8217;s really up to you to weigh the pros and the cons. I like nibs, other people, not so much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ferris Gabriel</title>
		<link>http://developer.casgrain.com/?p=94&#038;cpage=1#comment-9090</link>
		<dc:creator>Ferris Gabriel</dc:creator>
		<pubDate>Tue, 18 May 2010 15:46:37 +0000</pubDate>
		<guid isPermaLink="false">http://developer.casgrain.com/?p=94#comment-9090</guid>
		<description>&lt;a href=&quot;#comment-9088&quot; rel=&quot;nofollow&quot;&gt;@Philippe &lt;/a&gt; 
Oh perfect, I see what you&#039;re saying.
Now, with that, and if all UI texts are set programmatically, then we should be OK just using genstrings (and not have to use IBTOOL), is this correct?  For a small app, do you know if there&#039;ll be any noticeable runtime performance degradation for the app always having to translate from string files, as oppose to pre-localizing the XIBs with IBTOOL).  I&#039;m trying to weigh the effort with IBTOOL and increase in bundle size incurred with additional XIBs (one for each language), against using genstrings alone?  (sorry if this is too simple, this is our first iPhone project and therefore our first localization.)</description>
		<content:encoded><![CDATA[<p><a href="#comment-9088" rel="nofollow">@Philippe </a><br />
Oh perfect, I see what you&#8217;re saying.<br />
Now, with that, and if all UI texts are set programmatically, then we should be OK just using genstrings (and not have to use IBTOOL), is this correct?  For a small app, do you know if there&#8217;ll be any noticeable runtime performance degradation for the app always having to translate from string files, as oppose to pre-localizing the XIBs with IBTOOL).  I&#8217;m trying to weigh the effort with IBTOOL and increase in bundle size incurred with additional XIBs (one for each language), against using genstrings alone?  (sorry if this is too simple, this is our first iPhone project and therefore our first localization.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philippe</title>
		<link>http://developer.casgrain.com/?p=94&#038;cpage=1#comment-9088</link>
		<dc:creator>Philippe</dc:creator>
		<pubDate>Tue, 18 May 2010 03:32:45 +0000</pubDate>
		<guid isPermaLink="false">http://developer.casgrain.com/?p=94#comment-9088</guid>
		<description>&lt;blockquote cite=&quot;#commentbody-9087&quot;&gt;
&lt;strong&gt;&lt;a href=&quot;#comment-9087&quot; rel=&quot;nofollow&quot;&gt;Ferris Gabriel&lt;/a&gt; :&lt;/strong&gt;
&lt;p&gt;What do you mean by hard-coded keys?  I am assuming you mean that all user-visible labels, should be programmatically set rather than with IB, correct?&lt;/p&gt;
&lt;/blockquote&gt;

What I mean is, don&#039;t depend on the return value of NSLocalizedString. It is common to see &quot;NSLocalizedString(@&quot;Some sentence that needs to be localized&quot;, nil)&quot; where you should be using &quot;NSLocalizedString(@&quot;SentenceLabel&quot;, nil)&quot; and in your strings file, you have the translation between &quot;SentenceLabel&quot; = &quot;Some sentence that needs to be localized&quot; for every supported language. That way, English is just a language, not a key.</description>
		<content:encoded><![CDATA[<blockquote cite="#commentbody-9087"><p>
<strong><a href="#comment-9087" rel="nofollow">Ferris Gabriel</a> :</strong></p>
<p>What do you mean by hard-coded keys?  I am assuming you mean that all user-visible labels, should be programmatically set rather than with IB, correct?</p>
</blockquote>
<p>What I mean is, don&#8217;t depend on the return value of NSLocalizedString. It is common to see &#8220;NSLocalizedString(@&#8221;Some sentence that needs to be localized&#8221;, nil)&#8221; where you should be using &#8220;NSLocalizedString(@&#8221;SentenceLabel&#8221;, nil)&#8221; and in your strings file, you have the translation between &#8220;SentenceLabel&#8221; = &#8220;Some sentence that needs to be localized&#8221; for every supported language. That way, English is just a language, not a key.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ferris Gabriel</title>
		<link>http://developer.casgrain.com/?p=94&#038;cpage=1#comment-9087</link>
		<dc:creator>Ferris Gabriel</dc:creator>
		<pubDate>Tue, 18 May 2010 02:20:09 +0000</pubDate>
		<guid isPermaLink="false">http://developer.casgrain.com/?p=94#comment-9087</guid>
		<description>Can you expand on this statement:  &quot;This technique is important even if you have nib files, because most of your strings are probably in .strings files already. Don’t use hard-coded strings for anything that is user-visible. Only use hard-coded keys.&quot;

I do have XIBs, but would like to only use Localizable.strings files using genstrings if possible, and more importantly, only one XIB for all languages (as apposed to one for each).  What do you mean by hard-coded keys?  I am assuming you mean that all user-visible labels, should be programmatically set rather than with IB, correct?  If that&#039;s do-able I&#039;d like to use this approach and avoid using IBTOOL altogether.  Am I missing anything?  Are their drawbacks to this approach?</description>
		<content:encoded><![CDATA[<p>Can you expand on this statement:  &#8220;This technique is important even if you have nib files, because most of your strings are probably in .strings files already. Don’t use hard-coded strings for anything that is user-visible. Only use hard-coded keys.&#8221;</p>
<p>I do have XIBs, but would like to only use Localizable.strings files using genstrings if possible, and more importantly, only one XIB for all languages (as apposed to one for each).  What do you mean by hard-coded keys?  I am assuming you mean that all user-visible labels, should be programmatically set rather than with IB, correct?  If that&#8217;s do-able I&#8217;d like to use this approach and avoid using IBTOOL altogether.  Am I missing anything?  Are their drawbacks to this approach?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nobre</title>
		<link>http://developer.casgrain.com/?p=94&#038;cpage=1#comment-8553</link>
		<dc:creator>nobre</dc:creator>
		<pubDate>Thu, 25 Mar 2010 19:06:00 +0000</pubDate>
		<guid isPermaLink="false">http://developer.casgrain.com/?p=94#comment-8553</guid>
		<description>&lt;a href=&quot;#comment-8546&quot; rel=&quot;nofollow&quot;&gt;@Christiaan Hofman &lt;/a&gt; 
As I understood it, should I need to add one Run Script phase for each XIB ? I didn&#039;t exactly understand how to make they all run in a single script together with the Input/Output change, the feature says that if any of the input files differ from their output counterparts, the script will run.</description>
		<content:encoded><![CDATA[<p><a href="#comment-8546" rel="nofollow">@Christiaan Hofman </a><br />
As I understood it, should I need to add one Run Script phase for each XIB ? I didn&#8217;t exactly understand how to make they all run in a single script together with the Input/Output change, the feature says that if any of the input files differ from their output counterparts, the script will run.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nobre</title>
		<link>http://developer.casgrain.com/?p=94&#038;cpage=1#comment-8551</link>
		<dc:creator>nobre</dc:creator>
		<pubDate>Thu, 25 Mar 2010 19:01:52 +0000</pubDate>
		<guid isPermaLink="false">http://developer.casgrain.com/?p=94#comment-8551</guid>
		<description>&lt;a href=&quot;#comment-8540&quot; rel=&quot;nofollow&quot;&gt;@Philippe &lt;/a&gt; 
That&#039;s a really nice script, it works flawlessly, just what I was looking for. Thank you!
I still haven&#039;t got the hang of the genstrings feature yet, it seems very handy as well.</description>
		<content:encoded><![CDATA[<p><a href="#comment-8540" rel="nofollow">@Philippe </a><br />
That&#8217;s a really nice script, it works flawlessly, just what I was looking for. Thank you!<br />
I still haven&#8217;t got the hang of the genstrings feature yet, it seems very handy as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christiaan Hofman</title>
		<link>http://developer.casgrain.com/?p=94&#038;cpage=1#comment-8546</link>
		<dc:creator>Christiaan Hofman</dc:creator>
		<pubDate>Thu, 25 Mar 2010 12:24:18 +0000</pubDate>
		<guid isPermaLink="false">http://developer.casgrain.com/?p=94#comment-8546</guid>
		<description>&lt;a href=&quot;#comment-8505&quot; rel=&quot;nofollow&quot;&gt;@nobre &lt;/a&gt; 
To get an implicit check when .xib files are changed, add them to the list of Input/Output Files for the Run Script build phase. (I wish Xcode would make that easier by allowing drag&amp;drop.) I personally have an extra check at the beginning of these scripts to only run during a Release build (if [ &quot;$BUILD_STYLE&quot; = Debug ]; then exit 0; fi), to save a lot of time during the much more regularly used Debug build. I just need to do at least one Release build after changing or adding a .xib.</description>
		<content:encoded><![CDATA[<p><a href="#comment-8505" rel="nofollow">@nobre </a><br />
To get an implicit check when .xib files are changed, add them to the list of Input/Output Files for the Run Script build phase. (I wish Xcode would make that easier by allowing drag&amp;drop.) I personally have an extra check at the beginning of these scripts to only run during a Release build (if [ "$BUILD_STYLE" = Debug ]; then exit 0; fi), to save a lot of time during the much more regularly used Debug build. I just need to do at least one Release build after changing or adding a .xib.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philippe</title>
		<link>http://developer.casgrain.com/?p=94&#038;cpage=1#comment-8540</link>
		<dc:creator>Philippe</dc:creator>
		<pubDate>Wed, 24 Mar 2010 22:58:08 +0000</pubDate>
		<guid isPermaLink="false">http://developer.casgrain.com/?p=94#comment-8540</guid>
		<description>I implemented this technique in the open source Murky http://bitbucket.org/snej/murky and David Keegan improved it with a Python script that basically creates an md5 hash of your original files, and quickly computes that to see if they have changed before unleashing the translation scripts. Speeds up builds significantly, as the md5-hashing is very quick. Check it out here: http://bitbucket.org/snej/murky/src/tip/Localize.py</description>
		<content:encoded><![CDATA[<p>I implemented this technique in the open source Murky <a href="http://bitbucket.org/snej/murky" rel="nofollow">http://bitbucket.org/snej/murky</a> and David Keegan improved it with a Python script that basically creates an md5 hash of your original files, and quickly computes that to see if they have changed before unleashing the translation scripts. Speeds up builds significantly, as the md5-hashing is very quick. Check it out here: <a href="http://bitbucket.org/snej/murky/src/tip/Localize.py" rel="nofollow">http://bitbucket.org/snej/murky/src/tip/Localize.py</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nobre</title>
		<link>http://developer.casgrain.com/?p=94&#038;cpage=1#comment-8505</link>
		<dc:creator>nobre</dc:creator>
		<pubDate>Mon, 22 Mar 2010 20:14:15 +0000</pubDate>
		<guid isPermaLink="false">http://developer.casgrain.com/?p=94#comment-8505</guid>
		<description>Hello, I just implemented this on an pretty big project, and it will save us TONS of time doing the localization for the three primary languages we target. Is there a way to identify when the original XIB files are unchanged ? Or even a way to do a &quot;localized build&quot; that will trigger the script, rather than always generate the strings file from the original xib and build a localized xib for each strings file ? My build times increased a lot... I&#039;m currently deploying 20 xib files in 3 languages.
Thanks for the nice article!</description>
		<content:encoded><![CDATA[<p>Hello, I just implemented this on an pretty big project, and it will save us TONS of time doing the localization for the three primary languages we target. Is there a way to identify when the original XIB files are unchanged ? Or even a way to do a &#8220;localized build&#8221; that will trigger the script, rather than always generate the strings file from the original xib and build a localized xib for each strings file ? My build times increased a lot&#8230; I&#8217;m currently deploying 20 xib files in 3 languages.<br />
Thanks for the nice article!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Clarke</title>
		<link>http://developer.casgrain.com/?p=94&#038;cpage=1#comment-7725</link>
		<dc:creator>Alex Clarke</dc:creator>
		<pubDate>Wed, 03 Feb 2010 09:29:40 +0000</pubDate>
		<guid isPermaLink="false">http://developer.casgrain.com/?p=94#comment-7725</guid>
		<description>Excellent technique, thanks Philippe. I have just implemented this idea in DateLine, and it is working nicely. Whew, no more maintining 16 separate nib files!</description>
		<content:encoded><![CDATA[<p>Excellent technique, thanks Philippe. I have just implemented this idea in DateLine, and it is working nicely. Whew, no more maintining 16 separate nib files!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
