CSC/ECE 517 Fall 2013/ch1 1w18 bs

From Expertiza_Wiki
Revision as of 16:11, 16 September 2013 by Srparadk (talk | contribs)
Jump to navigation Jump to search

Internationalization in Rails

Introduction

In general when we start a conversation, the first default language of communication we use is English, but if the other person is not familiar with English we try and translate our dialogue in a language that the person is familiar with. Similarly whenever we write a program or a document we write it in English by default. But what if someone who is not familiar with English wants to read your program or code? The simple solution is that we translate program or code into a language that the person is familiar with. And for this, we use a term called internationalization.

Internationalization is a way by which we can view an application in various languages without actually making changes to the code of the application. This saves us a lot of time and effort, as we don’t have to write or edit the same code or document in all the copies.

Internationalization has an acronym, rather more of a numeronym ,which is i18n where the number 18 represents the number of letters between the first and last letters in the word internationalization.

Aspects to consider in Internationalization

Now when we are to change our application according to a particular language or a region , we need to keep in mind numerous points that are important, implicit, particular or sensitive to that language or region. Like for example when we take a language into consideration for which our application needs to be translated, we need to consider the spoken and written aspects of that language. Also, there might be a case when we have the same language but it differs from one region to other. For this we need to keep in mind the typical change in the use of words, grammar and symbol for each region that uses the same language. Our application must also provide support for the varied writing conventions that differ from a language to another language or from one region to another.

Below are the examples of the points we need to keep in mind while we provide internationalization to our application :

  • Language :

Here the i18n support to an application needs to provide the character encoding keeping in mind the following points:

  1. The written language differs. For example most of the languages like English, French, German follow a script that can have inputs from a standard keyboard. But there are other languages like Hindi, Marathi, Sanskrit that follow a script called Devnagri and this cannot be directly typed in from a standard keyboard. So if we have to provide support for these languages we need to support the translation of the characters used in these scripts.