AJAX and multi-lingual apps (i18n)
I found a great list of AJAX mistakes (http://swik.net/Ajax/Ajax+Mistakes) in the course of making one. When dealing with mutli-lingual apps you need to use the UTF-8 char set as it provides umlauts and tilde's for spanish and german (just to name a few). The obvious implementation is to set this on your HTML response. The easy part to miss though is to set them in ajax as Ajax Mistakes points out:
As it turned out I needed to set the content type of my response to include the UTF-8 character set like so:Character Sets
One big problem with using AJAX is the lack of support for character sets. You should always set the content character set on the server-side as well as encoding any data sent by Javascript. Use ISO-8859-1 if you use plain english, or UTF-8 if you use special characters, like æ, ø and å (danish special characters) Note: it is usually a good idea to go with utf-8 nowadays as it supports many languages).
Labels: ajax, i18n, javascript, multi-lingual
0 Comments:
Post a Comment
<< Home