Internationalizing your FB Canvas App – using externalized strings

After determining the user locale, the next thing that you should do is to avoid hard-coding text strings in your web pages.  Instead, you should externalized all the text strings used in your application.

It is true that more time is required in coding a page, but it really helps if you want to run your app in multiple languages.  Probably the easiest way to achieve this is to store the text strings for each language in separate files such as lang_en.php, lang_fr.php.  Then, by including different lang file (based on the user locale), the app can be displayed in different language.  You can also, say, store the text string in database.

Facebook does provide us with some translation tool…. but frankly speaking, I don’t think that is useful… at least I can build similar infrastructural component for my canvas application.Internationalizing your FB Canvas App – using externalized strings

About takwing

A moderator of the Official Facebook Developer Forum. http://www.takwing.idv.hk/tech/fb_dev/index.php
This entry was posted in Development Tips. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>