INTERNATIONALIZATION IN RUBY ON RAILS By: Siddhaarth Verma
What is i18n and L10n <ul><li>i18n (short for Internationalization ) is the process of designing a software application so...
So What's The Difference <ul><li>Internationalization is the adaptation of products for potential use virtually everywhere...
Cost Vs Benefit Tradeoff  <ul><li>In a commercial setting, the benefit from localization is access to more markets. It cos...
Where Does Rails Come In <ul><li>Well, from version 2.2 Rails ships with the Ruby I18n gem which provides us with and easy...
How Does It Work In Rails <ul><li>This module comes with the following features: </li></ul><ul><li>The main translation me...
<ul><li>It comes with a default exception handler which catches exceptions that are raised in the backend. </li></ul><ul><...
Demo <ul><li>Lets look at two very basic apps, one uses Rails 2.1 and the Gibberish plugin and the other uses Rails 2.2 an...
References <ul><li>I18n Wiki ( http://rails-i18n.org/wiki )‏ </li></ul><ul><li>Some text shamelessly copied from Wikipedia...
Upcoming SlideShare
Loading in...5
×

Internationalisation In Rails

1,873
-1

Published on

Internationalisation In Rails presented at Ruby Fun Day!!

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,873
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Internationalisation In Rails

  1. 1. INTERNATIONALIZATION IN RUBY ON RAILS By: Siddhaarth Verma
  2. 2. What is i18n and L10n <ul><li>i18n (short for Internationalization ) is the process of designing a software application so that it can be adapted to various languages and regions without engineering changes. </li></ul><ul><li>L10n (short for Localization) is the process of adapting software for a specific region or language by adding locale-specific components and translating text. </li></ul>
  3. 3. So What's The Difference <ul><li>Internationalization is the adaptation of products for potential use virtually everywhere, while localization is the addition of special features for use in a specific locale. </li></ul><ul><li>Internationalization is done once per product, while localization is done once for each combination of product and locale. </li></ul>
  4. 4. Cost Vs Benefit Tradeoff <ul><li>In a commercial setting, the benefit from localization is access to more markets. It costs more to produce products for international markets, but in an increasingly global economy, supporting only one language/market is scarcely an option. </li></ul><ul><li>Since open source software can generally be freely modified and redistributed, it is more prone to internationalization. The KDE project, for example, has been translated into over 100 languages. </li></ul>
  5. 5. Where Does Rails Come In <ul><li>Well, from version 2.2 Rails ships with the Ruby I18n gem which provides us with and easy to use and extensible framework and allows multi-language support for our applications. </li></ul><ul><li>The main focus of Rails I18n API is to provide support for English and similar languages out of the box and make it easy to customize and extend everything for other languages. </li></ul>
  6. 6. How Does It Work In Rails <ul><li>This module comes with the following features: </li></ul><ul><li>The main translation method #translate which is used to lookup translations. </li></ul><ul><li>The #localize method which is used to localize Date, DateTime and Time objects. </li></ul><ul><li>It stores a default locale which is used when no locale has been passed or set. </li></ul><ul><li>It stores a backend which carries the actual implementation for the translate and localize methods. </li></ul>
  7. 7. <ul><li>It comes with a default exception handler which catches exceptions that are raised in the backend. </li></ul><ul><li>Both the backend and the exception handler can be swapped with different implementations for cases where you need more flexibility and features. </li></ul>
  8. 8. Demo <ul><li>Lets look at two very basic apps, one uses Rails 2.1 and the Gibberish plugin and the other uses Rails 2.2 and the built in I18n API. </li></ul>
  9. 9. References <ul><li>I18n Wiki ( http://rails-i18n.org/wiki )‏ </li></ul><ul><li>Some text shamelessly copied from Wikipedia. :P </li></ul>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×