Multi-lingual Web applications

D

Dylan Parry

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,

--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk

Programming, n: A pastime similar to banging one's head
against a wall, but with fewer opportunities for reward.
 
L

Laurent Bugnion

Hi,

Dylan said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top