<?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>meier-online &#187; Programming</title>
	<atom:link href="http://meier-online.com/category/develop/feed/" rel="self" type="application/rss+xml" />
	<link>http://meier-online.com</link>
	<description>Der Blog von Karsten Meier</description>
	<lastBuildDate>Sun, 09 Oct 2011 13:27:57 +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>(Deutsch) LwUIT 1.5 erste Erfahrungen</title>
		<link>http://meier-online.com/en/2011/10/lwuit-1-5/</link>
		<comments>http://meier-online.com/en/2011/10/lwuit-1-5/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 13:21:06 +0000</pubDate>
		<dc:creator>meier</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JME]]></category>
		<category><![CDATA[LWUIT]]></category>

		<guid isPermaLink="false">http://meier-online.com/?p=794</guid>
		<description><![CDATA[Sorry, this entry is only available in Deutsch.]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://meier-online.com/category/develop/feed/">Deutsch</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://meier-online.com/en/2011/10/lwuit-1-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(Deutsch) Ilias Skins</title>
		<link>http://meier-online.com/en/2011/07/ilias-skins/</link>
		<comments>http://meier-online.com/en/2011/07/ilias-skins/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 11:39:43 +0000</pubDate>
		<dc:creator>meier</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://meier-online.com/?p=744</guid>
		<description><![CDATA[Sorry, this entry is only available in Deutsch.]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://meier-online.com/category/develop/feed/">Deutsch</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://meier-online.com/en/2011/07/ilias-skins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(Deutsch) Eins plus Zwei</title>
		<link>http://meier-online.com/en/2010/12/one-plus_two/</link>
		<comments>http://meier-online.com/en/2010/12/one-plus_two/#comments</comments>
		<pubDate>Thu, 30 Dec 2010 17:42:11 +0000</pubDate>
		<dc:creator>meier</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Traps]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Typumwandlung]]></category>

		<guid isPermaLink="false">http://meier-online.com/?p=726</guid>
		<description><![CDATA[Sorry, this entry is only available in Deutsch.]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://meier-online.com/category/develop/feed/">Deutsch</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://meier-online.com/en/2010/12/one-plus_two/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Multilingual Websites with Ruby on Rails (3)</title>
		<link>http://meier-online.com/en/2010/01/mehrsprachige-webseiten-mit-ruby-on-rails-3/</link>
		<comments>http://meier-online.com/en/2010/01/mehrsprachige-webseiten-mit-ruby-on-rails-3/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 10:02:16 +0000</pubDate>
		<dc:creator>meier</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[multilingualism]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://meier-online.com/?p=656</guid>
		<description><![CDATA[Part 3 &#8211; Quality Assurence Texte gehören zu den Teilen einer Anwendung, die häufig geändert werden. Wenn dann noch externe Übersetzer im Spiel sind, kann es leicht zu fehlenden Übersetzungen kommen Wir möchten deshalb automatisch testen, dass es zu allen Texten in Sprache A auch Übersetzungen in Sprache B vorhanden sind. Ein solcher Test allein [...]]]></description>
			<content:encoded><![CDATA[<p>Part 3 &#8211; Quality Assurence</p>
<p>Texte gehören zu den Teilen einer Anwendung, die häufig geändert werden. Wenn dann noch externe Übersetzer im Spiel sind, kann es leicht zu fehlenden Übersetzungen kommen</p>
<p>Wir möchten deshalb automatisch testen, dass es zu allen Texten in Sprache A auch Übersetzungen in Sprache B vorhanden sind. Ein solcher Test allein hilft schon sehr, und sollte ja nicht so schwierig sein.</p>
<p>Leider gibt es dabei eine Überraschung: in der Internationalisierung-API findet sich zur Zeit (Rails 2.3.5) keine Möglichkeit, alle Schlüssel aufzuzählen (sprich iterieren). Man muss also offenbar die Yaml-Dateien selbst einlesen, um an alle Schlüssel zu kommen. Unserer Test ist dabei leider abhängig von der konkreten Art der Datenhaltung.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">texts_hash = <span style="color:#CC00FF; font-weight:bold;">YAML</span>::<span style="color:#CC0066; font-weight:bold;">load</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">IO</span>.<span style="color:#9900CC;">read</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'config/locales/de.yml'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>Wie haben nun einen rekursiven Hash. Um alle Schlüssel zu überprüfen, extrahieren wie sie mit einer gesonderten Funktion. Diese Funktion ist einfach rekursiv aufgebaut.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> deep_hash_key<span style="color:#006600; font-weight:bold;">&#40;</span>hash, prefix<span style="color:#006600; font-weight:bold;">&#41;</span>
  hash.<span style="color:#9900CC;">keys</span>.<span style="color:#9900CC;">sort</span>.<span style="color:#9900CC;">collect</span><span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">|</span>key2<span style="color:#006600; font-weight:bold;">|</span>
    val = hash<span style="color:#006600; font-weight:bold;">&#91;</span>key2<span style="color:#006600; font-weight:bold;">&#93;</span>
    newprefix = prefix.<span style="color:#0000FF; font-weight:bold;">nil</span>? ? key2 : <span style="color:#996600;">&quot;#{prefix}.#{key2}&quot;</span>
    <span style="color:#9966CC; font-weight:bold;">if</span> val.<span style="color:#9900CC;">is_a</span>? <span style="color:#CC00FF; font-weight:bold;">Hash</span>
     deep_hash_key<span style="color:#006600; font-weight:bold;">&#40;</span>val, newprefix<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#9966CC; font-weight:bold;">else</span>
      newprefix
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#006600; font-weight:bold;">&#125;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Wollen wir jetzt die Übersetzungen für alle Schlüssel prüfen lauert die Zweite Falle: Wenn die Übersetzung eine Variableninterpolation enthält, erhalten wir einen Fehler beim Aufrufen der translate() Methode ohne den passenden Hash. Offenbar liefert uns die API auch keinen Zugriff auf den String ohne Interpolierung. Da uns in diesen Test nur die Existenz einer Übersetzung interessiert, und nicht ihr konkreter Wert, fangen wir die Exception &#8220;MissingInterpolationArgument&#8221; einfach auf.</p>
<p>Für eine deutsche Anwendung mit Übersetzungen in Englisch und Französisch sieht dann der Test so aus:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> test_all_texts_should_exists
  texts_hash = <span style="color:#CC00FF; font-weight:bold;">YAML</span>::<span style="color:#CC0066; font-weight:bold;">load</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">IO</span>.<span style="color:#9900CC;">read</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'config/locales/de.yml'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  de_keys = deep_hash_key<span style="color:#006600; font-weight:bold;">&#40;</span>texts_hash<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'de'</span><span style="color:#006600; font-weight:bold;">&#93;</span>, <span style="color:#0000FF; font-weight:bold;">nil</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">flatten</span>
  <span style="color:#9966CC; font-weight:bold;">for</span> lang <span style="color:#9966CC; font-weight:bold;">in</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'de'</span>, <span style="color:#996600;">'fr'</span>, <span style="color:#996600;">'en'</span><span style="color:#006600; font-weight:bold;">&#93;</span>
    I18n::locale = lang
    <span style="color:#9966CC; font-weight:bold;">for</span> key <span style="color:#9966CC; font-weight:bold;">in</span> de_keys
      <span style="color:#9966CC; font-weight:bold;">begin</span>
        val = I18n.<span style="color:#9900CC;">translate</span><span style="color:#006600; font-weight:bold;">&#40;</span>key, <span style="color:#ff3333; font-weight:bold;">:default</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#0000FF; font-weight:bold;">nil</span>, :<span style="color:#CC0066; font-weight:bold;">raise</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#0000FF; font-weight:bold;">true</span><span style="color:#006600; font-weight:bold;">&#41;</span>
      <span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#6666ff; font-weight:bold;">I18n::MissingTranslationData</span>
        val = <span style="color:#0000FF; font-weight:bold;">nil</span>
      <span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#6666ff; font-weight:bold;">I18n::MissingInterpolationArgument</span>
        val = <span style="color:#0000FF; font-weight:bold;">true</span>  <span style="color:#008000; font-style:italic;"># there was a value, only an argument is missing</span>
      <span style="color:#9966CC; font-weight:bold;">end</span>
      assert_not_nil<span style="color:#006600; font-weight:bold;">&#40;</span>val, <span style="color:#996600;">&quot;key missing for locale #{lang}: #{key}&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Wenn jetzt eine Übersetzung fehlt, liefert der Test eine Fehlermeldung der Art:</p>
<pre>
test_all_texts_should_exists(LocalisationTest): key missing for locale en: users.edit.title</pre>
<p>Die fehlende Übersetzung können wir dann ergänzen, bevor wir eine neue Version der Anwendung veröffentlichen.</p>
]]></content:encoded>
			<wfw:commentRss>http://meier-online.com/en/2010/01/mehrsprachige-webseiten-mit-ruby-on-rails-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(Deutsch) Classics reloaded: Das Assert-Makro von C</title>
		<link>http://meier-online.com/en/2009/09/assert/</link>
		<comments>http://meier-online.com/en/2009/09/assert/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 14:41:43 +0000</pubDate>
		<dc:creator>meier</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Assert]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[quality assurance]]></category>

		<guid isPermaLink="false">http://meier-online.com/?p=618</guid>
		<description><![CDATA[Sorry, this entry is only available in Deutsch.]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://meier-online.com/category/develop/feed/">Deutsch</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://meier-online.com/en/2009/09/assert/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(Deutsch) Rotierende Reklametafel mit jQuery</title>
		<link>http://meier-online.com/en/2009/08/rolling-billboard-jquery/</link>
		<comments>http://meier-online.com/en/2009/08/rolling-billboard-jquery/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 17:15:05 +0000</pubDate>
		<dc:creator>meier</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Reklametafel]]></category>

		<guid isPermaLink="false">http://meier-online.com/?p=584</guid>
		<description><![CDATA[Sorry, this entry is only available in Deutsch.]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://meier-online.com/category/develop/feed/">Deutsch</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://meier-online.com/en/2009/08/rolling-billboard-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multilingual Websites with Ruby on Rails (2)</title>
		<link>http://meier-online.com/en/2009/05/localize-ruby-on-rails-p2/</link>
		<comments>http://meier-online.com/en/2009/05/localize-ruby-on-rails-p2/#comments</comments>
		<pubDate>Tue, 12 May 2009 13:51:47 +0000</pubDate>
		<dc:creator>meier</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[multilingualism]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Validations]]></category>

		<guid isPermaLink="false">http://meier-online.com/?p=422</guid>
		<description><![CDATA[Part 2 &#8211; Variables, Validations, Model Classes Web pages often contains sentences in which a single word is changing. For example, &#8220;You are logged in as xxxx.&#8221; For the translation, we can obviously assemble the sentence from the components. There is often a problem, because the word order is different in different languages . Better [...]]]></description>
			<content:encoded><![CDATA[<h3>Part 2 &#8211; Variables, Validations, Model Classes</h3>
<p>Web pages often contains sentences in which a single word is changing. For example, &#8220;You are logged in as xxxx.&#8221; For the translation, we can obviously assemble the sentence from the components. There is often a problem, because the word order is different in different languages .</p>
<p>Better is the so-called interpolation, as Ruby itself also offers. The string contains a marked variable, which will be replaced at run time. The Yaml file specification does not use the Ruby syntax. Instead, you mark the variable with double curly brackets.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># Definition</span>
  logmsg: <span style="color:#996600;">&quot;You are logged in as {{name}}.&quot;</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># call</span>
I18n.<span style="color:#9900CC;">translate</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:logmsg</span>, <span style="color:#ff3333; font-weight:bold;">:name</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'Administrator'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#008000; font-style:italic;"># or short form</span>
t <span style="color:#ff3333; font-weight:bold;">:logmsg</span>, <span style="color:#ff3333; font-weight:bold;">:name</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'Administrator'</span></pre></div></div>

<p><span id="more-422"></span>We need to make sure that the parameters of the definition and the call are matching. The translate ()-method is relatively tolerant: Superfluous parameters are ignored.</p>
<p>:!: Attention: the person who translates must know that the variable names in the brackets must not be translated.</p>
<p>Another small trap lurks in the variable names: They may not have the names one of the other parameters of the translate () method. Not allowed are therefore &#8220;default&#8221; and &#8220;scope&#8221;.</p>
<h3>Texts of Validations</h3>
<p>Even if our application is monolingual in another language than English, we get surprised in one area: The automatically generated error messages from the validation of the model classes. Very convenient, but unfortunately only in English.</p>
<p>Also, the messages contains the class name and attribute name from the ruby code directly. Classes and attribute names are chosen to serve the needs of the programmers. For users, other words are sometimes more appropriate.</p>
<p>You see the composition of such an error message in this picture:</p>
<p><img class="alignnone size-full wp-image-444" title="Composion of the translation of an error message from the model validation in Rails" src="http://meier-online.com/blog/uploads/rails-fehlermeldungen-ersetzung400.png" alt="Composion of the translation of an error message from the model validation in Rails" width="420" height="212" /></p>
<p>To display the validation message with texts in our local language, we need only the translations with the right keys in our translation Yaml file. The template sentences are defined in the area (scope) activerecord.messages. Since these are are equal for all applications, there exists already standard translations for many languages.</p>
<h3>Model Translation</h3>
<p>We define the names of the fields and objects in the Yaml file with the key activerecord.models.classname or activerecord.attributs.classname.attributname. Rails recognizes these keys and uses the translations correctly in the automatic validation notifications.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">activerecord:
  models:
    term: &quot;Begriff&quot;
  attributes:
    term:
      name: &quot;Name&quot;
      topic: &quot;Sachgebiet&quot;</pre></div></div>

<p>The central translation of class names and field names is also useful for the views. So we don&#8217; t need to translate the the labels of input fields a second or third time.</p>
<p>For the view this does not always make sense. The user interface should not stick too narrow to the model. The important thing is the user.</p>
<h3>Validations with own Messages</h3>
<p>A typical use for a specific message is to check of a phone number. The methods for the specification of the validations have a parameter &#8220;message&#8221;.</p>
<p>So the translation should be no problem: we should just call t ()-method, right? Unfortunately it is not that easy:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># funktioniert so nicht! Does not work!</span>
validates_format_of<span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#ff3333; font-weight:bold;">:fax</span>,<span style="color:#006600; font-weight:bold;">&#123;</span>
    <span style="color:#ff3333; font-weight:bold;">:with</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">/</span>\A<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">9</span> \<span style="color:#006600; font-weight:bold;">+</span>\<span style="color:#006600; font-weight:bold;">-</span>\<span style="color:#006600; font-weight:bold;">/</span>\<span style="color:#006600; font-weight:bold;">&#40;</span>\<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">+</span>\Z<span style="color:#006600; font-weight:bold;">/</span>i,
    <span style="color:#ff3333; font-weight:bold;">:message</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> t<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'activerecord.errors.messages.bad_phone'</span><span style="color:#006600; font-weight:bold;">&#41;</span>,
    <span style="color:#ff3333; font-weight:bold;">:allow_blank</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>Depending on the version and the deployment, Rails either did not even start or it does not delivers the required translation. What&#8217;s wrong?</p>
<p>The language is set for each request of the web user. But the declarative validations are defined as part of the model class, there is no request at this time! It therefore makes no sense to call a translate method in this stage.</p>
<p>But how do we solve this problem? Typical of Rails, the solution is already built in. But if you don&#8217;t  know, you can go in round circles.</p>
<p>We can put a symbol rather than a string as the message parameter. Now the symbol will be evaluated at the time when the error message will be displayed.</p>
<p>The symbol gets evaluated in these specific contexts (scope) one after another:</p>
<ul>
<li>activerecord.errors.models.[model_name].attributes.[attribute_name]</li>
<li>activerecord.errors.models.[model_name]</li>
<li>activerecord.errors.messages</li>
</ul>
<p>Therefore we can simply write our validation like this:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">validates_format_of<span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#ff3333; font-weight:bold;">:fax</span>, <span style="color:#006600; font-weight:bold;">&#123;</span>
     <span style="color:#ff3333; font-weight:bold;">:with</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">/</span>\A<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">9</span>\<span style="color:#006600; font-weight:bold;">+</span>\<span style="color:#006600; font-weight:bold;">-</span>\<span style="color:#006600; font-weight:bold;">/</span>\<span style="color:#006600; font-weight:bold;">&#40;</span>\<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">+</span>\Z<span style="color:#006600; font-weight:bold;">/</span>i,
     <span style="color:#ff3333; font-weight:bold;">:message</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#ff3333; font-weight:bold;">:bad_phone</span>,
     <span style="color:#ff3333; font-weight:bold;">:allow_blank</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span> <span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<h4>Sources:</h4>
<p>Description (Guide) of the Internationalization API: <a title="Official guide of the ruby on rails internationalization api" href="guides.rubyonrails.org/i18n.html" target="_blank">guides.rubyonrails.org/i18n.html</a></p>
<p>Language files for standard translations: <a title="default translation file for many languages" href="http://github.com/svenfuchs/rails-i18n/tree/master/rails/locale" target="_self">github.com/svenfuchs/rails-i18n/rails/locale</a></p>
]]></content:encoded>
			<wfw:commentRss>http://meier-online.com/en/2009/05/localize-ruby-on-rails-p2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

