Hi,
Dylan Parry wrote:
Hi folks,
I was wondering if anyone here has experience of making Web applications
that are multi-lingual? The solution that I have in my head is to have
several "language" files as resources so that there are no hard-coded
strings within my class library, but I'm not sure how to start.
Is there a recommended technique for doing this, or maybe some tutorials
that show some simple implementations of such a system?
Thanks,
Making a multilingual web app is very similar to making a multilingual
windows app: You store the texts in resx files, you use a resource
manager to get them.
Biggest difference is that some of the texts have to be passed to
JavaScript (status labels, alerts, etc...), so you need to create quite
some script dynamically.
Also, non-ASCII characters and non-XML characters have to be handled
with a lot of care. Depending if the text is written in HTML or in the
script, you need to encode them differently.
You can set the language of your environment using the Culture and
UICulture settings in the web.config, under the globalization section.
HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering:
http://www.galasoft-LB.ch
PhotoAlbum:
http://www.galasoft-LB.ch/pictures
Support children in Calcutta:
http://www.calcutta-espoir.ch