<?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>Ruby on Rails Outsourcing &#187; i18n</title>
	<atom:link href="http://www.ruby-on-rails-outsourcing.com/tag/i18n/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ruby-on-rails-outsourcing.com</link>
	<description>Kirana Tama - Rails outsourcing company that helps small businesses minimize their costs</description>
	<lastBuildDate>Wed, 28 Jul 2010 05:58:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Rails Multi-language</title>
		<link>http://www.ruby-on-rails-outsourcing.com/2009/12/14/rails-multi-language/</link>
		<comments>http://www.ruby-on-rails-outsourcing.com/2009/12/14/rails-multi-language/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 07:50:16 +0000</pubDate>
		<dc:creator>William Notowidagdo</dc:creator>
				<category><![CDATA[Knowledge]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://www.ruby-on-rails-outsourcing.com/?p=191</guid>
		<description><![CDATA[We have done multi-language feature for several Rails applications in the past, using gettext, gibberish, gibberish_db, etc. In this blog post I want to share the latest multi-language feature we built for our Netherland client recently, using Globalize2 plugin and Rails built-in I18n.
We used I18n for all our static contents, it&#8217;s a piece of cake. [...]]]></description>
			<content:encoded><![CDATA[<p>We have done <a href="http://www.google.com/search?q=rails+internationalization">multi-language feature for several Rails</a> applications in the past, using <a href="http://github.com/grosser/gettext_i18n_rails">gettext</a>, <a href="http://www.railslodge.com/plugins/345-gibberish">gibberish</a>, <a href="http://www.railslodge.com/plugins/912-gibberish-db">gibberish_db</a>, etc. In this blog post I want to share the latest multi-language feature we built for our Netherland client recently, using <a href="http://github.com/joshmh/globalize2">Globalize2</a> plugin and Rails built-in <a href="http://rails-i18n.org/">I18n</a>.</p>
<p>We used I18n for all our static contents, it&#8217;s a piece of cake. And all the client needs to do is to update that ymls files. For dynamic contents, we use Globalize2.</p>
<p>Here comes the fun part. Because you are most likely be working on an existing application, the bulk of the work is not making a nice back-end for multi-language objects, but it&#8217;s making sure the Rails application works correctly after we implement multi-language. It&#8217;s especially true when the application doesn&#8217;t have a complete test suite :)</p>
<p>Some things worth noting:</p>
<ol>
<li> All occurrences of find_by_name will no longer work correctly. So grep that and modify accordingly</li>
<li>Basically all queries that use &#8216;name&#8217; field, either on the select clause or condition clause, will also no longer work correctly</li>
<li>All routes that need locale path should also be added /locale/ to it</li>
<li>Javascript methods within a .js file that calls a Rails action and needs &#8216;locale&#8217;. Simply make a global Javascript variable for the locale and use that when necessary within the .js file</li>
<li>Javascript method that uses hard-coded words. Eg. &#8220;this.value = &#8216;Beware&#8217;&#8221;. Either we refactor it completely since it&#8217;s most likely we can do it another cleaner way, or we have to pull out that Javascript method from .js file to rhtml</li>
</ol>
<p>If you need a partner in developing your next Multi-language Rails application, we may be able to offer a good help! Contact us at <span style="text-decoration: underline;">info[at]kiranatama[dot]com</span></p>
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-bg-sexy"><ul class="socials"><li class="sexy-delicious"><a href="http://del.icio.us/post?url=http://www.ruby-on-rails-outsourcing.com/2009/12/14/rails-multi-language/&amp;title=Rails+Multi-language" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li><li class="sexy-digg"><a href="http://digg.com/submit?phase=2&amp;url=http://www.ruby-on-rails-outsourcing.com/2009/12/14/rails-multi-language/&amp;title=Rails+Multi-language" rel="nofollow" class="external" title="Digg this!">Digg this!</a></li><li class="sexy-stumbleupon"><a href="http://www.stumbleupon.com/submit?url=http://www.ruby-on-rails-outsourcing.com/2009/12/14/rails-multi-language/&amp;title=Rails+Multi-language" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li><li class="sexy-technorati"><a href="http://technorati.com/faves?add=http://www.ruby-on-rails-outsourcing.com/2009/12/14/rails-multi-language/" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a></li><li class="sexy-facebook"><a href="http://www.facebook.com/share.php?u=http://www.ruby-on-rails-outsourcing.com/2009/12/14/rails-multi-language/&amp;t=Rails+Multi-language" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a></li><li class="sexy-twitter"><a href="http://twitter.com/home?status=Rails+Multi-language+-+http://b2l.me/bhk4n+(via+@ptwgs)" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li><li class="sexy-mail"><a href="mailto:?subject=%22Rails%20Multi-language%22&amp;body=I%20thought%20this%20article%20might%20interest%20you.%0A%0A%22We%20have%20done%20multi-language%20feature%20for%20several%20Rails%20applications%20in%20the%20past%2C%20using%20gettext%2C%20gibberish%2C%20gibberish_db%2C%20etc.%20In%20this%20blog%20post%20I%20want%20to%20share%20the%20latest%20multi-language%20feature%20we%20built%20for%20our%20Netherland%20client%20recently%2C%20using%20Globalize2%20plugin%20and%20Rails%20built-in%20I18n.%0D%0A%0D%0AWe%20used%20I1%22%0A%0AYou%20can%20read%20the%20full%20article%20here%3A%20http://www.ruby-on-rails-outsourcing.com/2009/12/14/rails-multi-language/" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a></li><li class="sexy-comfeed"><a href="http://www.ruby-on-rails-outsourcing.com/2009/12/14/rails-multi-language/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a></li><li class="sexy-linkedin"><a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://www.ruby-on-rails-outsourcing.com/2009/12/14/rails-multi-language/&amp;title=Rails+Multi-language&amp;summary=We%20have%20done%20multi-language%20feature%20for%20several%20Rails%20applications%20in%20the%20past%2C%20using%20gettext%2C%20gibberish%2C%20gibberish_db%2C%20etc.%20In%20this%20blog%20post%20I%20want%20to%20share%20the%20latest%20multi-language%20feature%20we%20built%20for%20our%20Netherland%20client%20recently%2C%20using%20Globalize2%20plugin%20and%20Rails%20built-in%20I18n.%0D%0A%0D%0AWe%20used%20I1&amp;source=Ruby on Rails Outsourcing" rel="nofollow" class="external" title="Share this on Linkedin">Share this on Linkedin</a></li></ul><div style="clear:both;"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.ruby-on-rails-outsourcing.com/2009/12/14/rails-multi-language/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
