Programatically select which resource file to load from

M

Michael

Hi.

Could anyone help me out with this one.

I have a aspx page from where users may send invites to other users.
When the user clicks the "send invite"-button an email is generated.
Now here's the case:
I'm interested in sending the email in the language chosen by the user.


mail.Body = Resources.iwm.emailBodySendWL;

This would load the corresponding language as given in the @page directive
(UICulture="auto")
But lets say the user is interested in sending an invite in another language
than he/she has in the browsersettings.
Whats the best way to achieve that?

Thanks!

Michael
 
C

Cowboy \(Gregory A. Beamer\)

This is not a localization problem, per se, if the user can select the
language to send in. It is a decision point. And, you simply pull the file
that corresponds to the langauge the user selected.

If you want to use resource files for email (not the best choice, but you
can make it work), then pull the text using the localization bits based on
the culture the user is, or selects. As long as you have a resource file in
that language it is fairly easy. This is not the intent of
globalization/localization through resource files, but it is an interesting
usage.

I would suggest looking for Michele Bustamante's work on MSDN, or tune in to
her blog:
http://www.dasblonde.net/

A google search using the site: tag should yield something.
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top