Programatically select which resource file to load from

  • Thread starter Thread starter Michael
  • Start date Start date
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
 
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.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
 
Back
Top