<?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>Rails on the Run &#187; i18n</title>
	<atom:link href="http://railsontherun.com/tag/i18n/feed/" rel="self" type="application/rss+xml" />
	<link>http://railsontherun.com</link>
	<description>Rails experiments by Matt Aimonetti</description>
	<lastBuildDate>Tue, 23 Feb 2010 07:28:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Globalite Major update</title>
		<link>http://railsontherun.com/2007/09/02/globalite-major-update/</link>
		<comments>http://railsontherun.com/2007/09/02/globalite-major-update/#comments</comments>
		<pubDate>Sun, 02 Sep 2007 22:21:00 +0000</pubDate>
		<dc:creator>Matt Aimonetti</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[activeRecord]]></category>
		<category><![CDATA[chinese]]></category>
		<category><![CDATA[globalite]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[l10n]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[simplified chinese]]></category>
		<category><![CDATA[traditional chinese]]></category>
		<category><![CDATA[translation]]></category>

		<guid isPermaLink="false">http://railsontherun.com/2007/09/02/globalite-major-update</guid>
		<description><![CDATA[I&#8217;m glad to announce a major update of Globalite. First off I&#8217;d like to thank all the translators who helped with this release. Globalite now support its first Asian language: Chinese! Ivan Chang did an awesome job creating a localization file in Chinese for Taiwan, Hong Kong and Main Land China. I&#8217;m really glad thinking [...]]]></description>
			<content:encoded><![CDATA[<h2><em>I&#8217;m glad to announce a major update of Globalite.</em></h2>
<p>First off I&#8217;d like to thank all the translators who helped with this release. </p>
<ul>
<li>
<p>Globalite now support its <strong>first Asian language: Chinese!</strong><br />
Ivan Chang did an awesome job creating a localization file in Chinese for Taiwan, Hong Kong and Main Land China. I&#8217;m really glad thinking that Globalite will make the Rails experience much nicer for a lot of Chinese people.</p>
</li>
<li>
<p>Ivan also pushed me to add a new feature that people had asked about: a <strong>better ActiveRecord error message support</strong>.</p>
</li>
</ul>
<p>You know how Rails has a nice way of displaying your Model errors:</p>
<p><img src="http://farm2.static.flickr.com/1052/1306879608_e60431d214_o.png" alt="AR_error"/></p>
<p>Well, now that&#8217;s automatically translated in your locale. (as long as the new localization files are up to date. Feel free to contact me if you want to improve the locale file in your own language)</p>
<ul>
<li>I also added support for pluralization directly in the translation file. (pluralization doesn&#8217;t always make sense in some languages) I&#8217;m planning on adding a better Inflector support later on.</li>
</ul>
<p>for now, in your translation file simply use:</p>
<pre><code>horse_count: we have pluralize{{count}, horse} in the ranch
</code></pre>
<p>In your view use the localization with arguments to pass the count:</p>
<pre><code>&lt;%= :horse_count.l_with_args({:count =&gt; @horse.count}) %&gt;
</code></pre>
<p>See <a href="http://code.google.com/p/globalite/wiki/PluralizationSupport">the wiki</a> for more information about pluralization.</p>
<ul>
<li>Finally the <a href="http://globalite.googlecode.com/svn/sample/ui/">demo app</a> has been updated with an example of how to grab the acceptable locale from the header. (thanks to Emmanuel Bouton)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://railsontherun.com/2007/09/02/globalite-major-update/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Globalite &#8211; usage example</title>
		<link>http://railsontherun.com/2007/07/03/globalite-usage-example/</link>
		<comments>http://railsontherun.com/2007/07/03/globalite-usage-example/#comments</comments>
		<pubDate>Tue, 03 Jul 2007 04:00:00 +0000</pubDate>
		<dc:creator>Matt Aimonetti</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[date_select]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[globalite]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[localization]]></category>

		<guid isPermaLink="false">http://railsontherun.com/2007/08/03/globalite-usage-example</guid>
		<description><![CDATA[If you haven&#8217;t check out the Globalite sample app yet, here are some screenshots. Here is the French yml file used for the UI translation/localization: Here is the code to display a select box so the user can choose the publication date: So you know, &#60;%= :published_date.l %&#62; is the same as &#60;%= :published_date.localize %&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>If you haven&#8217;t check out the <a href="http://globalite.googlecode.com/svn/sample/ui/">Globalite sample app</a> yet, here are some screenshots.</p>
<p>Here is the French yml file used for the UI translation/localization:</p>
<p><img src="http://myskitch.com/matt_a/fr.yml__ui-20070702-200052.jpg" alt="create a yml file with the translation"/></p>
<p>Here is the code to display a select box so the user can choose the publication date:</p>
<p><img src="http://myskitch.com/matt_a/date_select-code-20070702-195558.jpg" alt="write some code to let the user choose a published date "/></p>
<p>So you know,</p>
<pre><code>&lt;%= :published_date.l %&gt;
</code></pre>
<p>is the same as </p>
<pre><code>&lt;%= :published_date.localize %&gt;
</code></pre>
<p>Globalite will try to load the translation of the :published_date key using the locale you set. (if you didn&#8217;t set a locale, it will try in English. If there was no English translation available, a warning message would be displayed instead of the translation. We could have also done the following:</p>
<pre><code>&lt;%= :published_date.l('Published Date') %&gt;
</code></pre>
<p>If you pass a string to the localization function, Globalite will display it in the case where it doesn&#8217;t find a translation.</p>
<p>Here is the default view in English:</p>
<p><img src="http://myskitch.com/matt_a/date_select_en-20070702-192452.jpg" alt="let's look at the view in English (default locale)"/></p>
<p>Change the locale to French  ( Locale.code = &#8216;fr-*&#8217;  or use the select box in the demo app).<br />
Let&#8217;s display the same page:</p>
<p><img src="http://myskitch.com/matt_a/date_select_fr-20070702-192257.jpg" alt="same date select box in French"/></p>
<p>Note that in French, the date is different, on top of having translated month names, the order is different. American English format is year/month/day while the French format is day/month/year.</p>
<p>You get all of that for free and even more.</p>
<p>Just for the fun, here is another example of localization: currency. you might know it, but each country, on top of having a different currency display numbers differently.</p>
<p>In the England, it would look like that: </p>
<p><img src="http://myskitch.com/matt_a/nbr_to_currency-uk-20070702-203822.jpg" alt="uk"/></p>
<p>Note that the currency is before the amount and that there&#8217;s a separator for the thousands and a delimiter for the pence.</p>
<p>In France, it would look like that:</p>
<p><img src="http://myskitch.com/matt_a/nbr_to_currency-fr-20070702-202242.jpg" alt="fr"/></p>
<p>The currency is after the amount and the French separator is actually the British delimiter and vice versa!</p>
<p>Spain also uses the Euro as currency but they don&#8217;t display the same amount in the same way:</p>
<p><img src="http://myskitch.com/matt_a/nbr_to_currency-es-20070702-203736.jpg" alt="es"/></p>
<p>The code to display the amount for each locale is the following:</p>
<pre><code>&lt;%= number_to_currency(9999.99) %&gt;
</code></pre>
<p>Pretty cool and simple, isn&#8217;t it? Check out the <a href="http://globalite.googlecode.com/svn/sample/ui/">sample app</a> for more advance used.</p>
<p><em>Enjoy</em></p>
<p>p.s: thanks <a href="http://joshknowles.com">josh knowles</a> for the <a href="http://plasq.com/skitch/">skitch</a> invite, it&#8217;s awesome!</p>
]]></content:encoded>
			<wfw:commentRss>http://railsontherun.com/2007/07/03/globalite-usage-example/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Globalite &#8211; sample application</title>
		<link>http://railsontherun.com/2007/07/02/globalite-sample-application/</link>
		<comments>http://railsontherun.com/2007/07/02/globalite-sample-application/#comments</comments>
		<pubDate>Mon, 02 Jul 2007 07:39:00 +0000</pubDate>
		<dc:creator>Matt Aimonetti</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[globalite]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[internationalization]]></category>
		<category><![CDATA[l10n]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[sample]]></category>

		<guid isPermaLink="false">http://railsontherun.com/2007/08/03/globalite-sample-application</guid>
		<description><![CDATA[I recently received quite a lot of love because of Globalite. Even though I tried to write some documentation about the plugin, I know that there&#8217;s not much. I also know that there&#8217;s a difference between showing how to set a locale and how to actually use that code in a real application. To fill [...]]]></description>
			<content:encoded><![CDATA[<p>I recently received quite a lot of love because of Globalite. Even though I tried to write some documentation about the plugin, I know that there&#8217;s not much. I also know that there&#8217;s a difference between showing how to set a locale and how to actually use that code in a real application.</p>
<p>To fill this gap I wrote a very simple and rough Rails sample application with a fully localized User Interface:</p>
<p><img src="http://farm2.static.flickr.com/1347/691265267_bbc167f7ab.jpg?v=0" alt="UI Localization sample app"/></p>
<p>Looking at the code you will find out how to:</p>
<ul>
<li>use a different css per locale (language/country)</li>
<li>use a different picture per locale</li>
<li>set a default css/picture if the translator doesn&#8217;t specify one</li>
<li>UI localization</li>
<li>rails core localization examples</li>
<li>create a select box of available UI translations</li>
<li>get/set the locale only a specific user so other users start by seeing the default translation</li>
<li>use a translation with many dynamic arguments</li>
<li>nested translation</li>
</ul>
<p>note: I froze Edge for this sample app (it wasn&#8217;t required, Globalite works well with older version of Rails). </p>
<p>To install and run the app, just do the following:</p>
<pre><code>$ svn checkout http://globalite.googlecode.com/svn/sample/ui globalite-sample-app
</code></pre>
<p>edit config/database.example and rename it config/database.yml</p>
<pre><code>$ rake db:create

$ rake db:migrate

$ ruby script/server
</code></pre>
<p>Don&#8217;t hesitate to <a href="http://www.railsontherun.com/2007/7/2/globalite-sample-application#comments">leave a comment</a>, submit a Rails core localization file in your language or <a href="http://code.google.com/p/globalite/issues/list">submit a bug</a></p>
]]></content:encoded>
			<wfw:commentRss>http://railsontherun.com/2007/07/02/globalite-sample-application/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Globalite update</title>
		<link>http://railsontherun.com/2007/06/27/globalite-update/</link>
		<comments>http://railsontherun.com/2007/06/27/globalite-update/#comments</comments>
		<pubDate>Wed, 27 Jun 2007 21:53:00 +0000</pubDate>
		<dc:creator>Matt Aimonetti</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[globalite]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[internationalization]]></category>
		<category><![CDATA[l10n]]></category>
		<category><![CDATA[locale]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[translation]]></category>

		<guid isPermaLink="false">http://railsontherun.com/2007/06/27/globalite-update</guid>
		<description><![CDATA[Today I updated Globalite, refactoring the code and fixing some issues. I added a bunch of aliases since I was tired of typing: Globalite.current_language = :fr I shortened it to Globalite.language = :fr But the old method is still available so it won&#8217;t break your code The major change with this update is a better [...]]]></description>
			<content:encoded><![CDATA[<p>Today I updated Globalite, refactoring the code and fixing some issues.</p>
<p>I added a bunch of aliases since I was tired of typing:</p>
<pre><code>Globalite.current_language = :fr
</code></pre>
<p>I shortened it to </p>
<pre><code>Globalite.language = :fr
</code></pre>
<p>But the old method is still available so it won&#8217;t break your code <img src='http://railsontherun.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>The major change with this update is a better support for locales. Let&#8217;s say that in our application we setup the language to :fr (French) but we didn&#8217;t specify a country. Remember that Globalite lets you have specific translations/localizations per country so you can display dates, prices properly.  </p>
<p>Previously, if my locale was set to :fr-* then Globalite would try to load the fr.yml files and not fr-FR.yml.</p>
<p>If you decided to use a fr.yml file for your UI localization, you might have noticed that all the Rails core messages weren&#8217;t translated(now you know why). This update deals with this issue and if a translation isn&#8217;t found in your locale, it will look for translations in your language but from a different country and pick a random one.</p>
<p>I&#8217;m expecting Rails core translations in Japanese, Korean and Chinese. Feel free to email me your own file and let me know on what project you used Globalite.</p>
]]></content:encoded>
			<wfw:commentRss>http://railsontherun.com/2007/06/27/globalite-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Globalite or another i18n/l10n solution</title>
		<link>http://railsontherun.com/2007/05/15/globalite-i18n-i10n-solution/</link>
		<comments>http://railsontherun.com/2007/05/15/globalite-i18n-i10n-solution/#comments</comments>
		<pubDate>Tue, 15 May 2007 15:58:00 +0000</pubDate>
		<dc:creator>Matt Aimonetti</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[globalite]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[internationalization]]></category>
		<category><![CDATA[l10n]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[translation]]></category>

		<guid isPermaLink="false">http://railsontherun.com/2007/06/14/globalite-i18n-i10n-solution</guid>
		<description><![CDATA[I&#8217;ve been recently slightly annoyed by the lack of simple yet powerful internationalization/localization plugin for Rails. It seems like the only real solution out there is Globalize However, it&#8217;s a heavy, bloated, hard to setup plugin. I might seem to complain, but I&#8217;m actually glad that someone came up with a decent solution. Globalize is [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been recently slightly annoyed by the lack of simple yet powerful internationalization/localization plugin for Rails.<br />
It seems like the only real solution out there is <a href="http://www.globalize-rails.org">Globalize</a> </p>
<p>However, it&#8217;s a heavy, bloated, hard to setup plugin. I might seem to complain, but I&#8217;m actually glad that someone came up with a decent solution. Globalize is quite powerful but I would like to see something simpler, lighter and easier to use.</p>
<p>While I was looking for alternate solutions, <a href="http://errtheblog.com/">Err</a> released <a href="http://errtheblog.com/post/4396">Gibberish</a> a simple and nice localization plugin.</p>
<p>Looking at Chris&#8217; code, I found a clean and nice solution but unfortunately too simple. The major problem I had with Giberrish was the lack of support for locales. That means that one cannot create an application supporting British English and American English. I lived in  both America and the UK and believe me, I can never spell some words properly. How should I spell the following words: colours or colors, behaviour or behavior, aluminium or aluminum? On top of that, your UI might be slightly different based on the region your visitor is coming from. Localization is more than translation.</p>
<p>Anyway, I decided to come up with my own solution, a breed of the best features from my favorite i18n/l10n projects. This hybrid solution should, hopefully be useful for people not needing all the resources of Globalize. I called my new project <em>Globa_lite_</em></p>
<h2>What&#8217;s cool with Globalite?</h2>
<ul>
<li>
<p>Simple UI localization</p>
<ul>
<li>support different locales</li>
<li>yml file based</li>
<li>simple syntax</li>
<li>no setup needed</li>
<li>enough for most projects needing localization</li>
<li>pass variables to the localization and let the translator deal with it</li>
</ul>
</li>
<li>
<p>Simple Rails Localization</p>
<ul>
<li>support different locales</li>
<li>nothing to do, rails comes in your own language (including currency conversion and other helpers)</li>
<li>yml file based localization for easy update</li>
<li>support for Rails 1.2x</li>
<li>simple to maintain</li>
<li>simple to add/edit a new locale</li>
</ul>
</li>
<li>
<p>Simple content i18n/l10n (coming soon)</p>
</li>
</ul>
<h2>UI localization:</h2>
<ul>
<li>Create a lang/ui folder at the root of the folder.</li>
<li>create 2 localization files: fr.yml and en-US.yml</li>
<li>add localization keys in the files:</li>
</ul>
<p>fr.yml:</p>
<pre><code>hello: bonjour

welcome: bienvenue
</code></pre>
<p>en-US.yml</p>
<pre><code>hello: howdy

welcome: welcome
</code></pre>
<ul>
<li>
<p>Declare the current locale or language </p>
<pre><code>Globalite.current_language :fr
</code></pre>
</li>
<li>
<p>In your view (or anywhere else) localize a key </p>
<pre><code>:hello.l
</code></pre>
</li>
</ul>
<p>or</p>
<pre><code>:hello.localize
</code></pre>
<p>you can also do </p>
<pre><code>:unknown_key.l("this is the default text to display if the localization isn't found")
</code></pre>
<p>Also you can pass one or many variables to the localization(check the documentation)</p>
<h2>Rails Localization</h2>
<p>Rails is automatically localized for you (meaning most helpers, including the currency converter are localized for the locale you declared).<br />
You really easily add a new supported rails language/settings by adding a yml file or editing an existing one. (for now, I only create an English and a French localization file, but I&#8217;ll add plenty more very soon)</p>
<p>Globalite also saves the locale in the session allowing many users to see a site at the same time in different languages <img src='http://railsontherun.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I believe Globalite is/will be a good solution for most of my international projects. It still lacks the content i18n and l10n as well as support for pluralization but it should be added soon.</p>
<p>Give it a try and let me know what you think:</p>
<p><a href="http://rubyforge.org/projects/globalite">RubyForge page</a></p>
<p>svn repository: svn checkout svn://rubyforge.org/var/svn/globalite/trunk globalite</p>
<p><a href="http://viewvc.rubyforge.mmmultiworks.com/cgi/viewvc.cgi/?root=globalite">view repository content</a></p>
<p>ps: The project is still in beta and will change during the next few weeks, feel free to submit patches, ideas, suggestions&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://railsontherun.com/2007/05/15/globalite-i18n-i10n-solution/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

