Tuesday, July 12, 2011

Best way to implement support for multiple languages in a web app?

There are some basic trick to make multi language supported application:

1. Store data in UTF in your DB.  

2. Do not hard code strings anywhere in the code. Use resource files so you can translate just them to enable support for a new language.

3. Do not hard code any styles in the HTML(like: float:left, etc.) but externalize them in CSS files. That way, you don't need an army of developers to support Arabic, which is read from right to left.

4. Pay attention to common areas (such as header, footer, etc., which maybe left/right aligned) typically reserved for branding and navigation. Like the styles above, these are affected by I18N.
I18N is actually easy and requires only a little planning and care.

Njoy Coding......:)

No comments:

Post a Comment