473,657 Members | 2,680 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Programatically select which resource file to load from

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.e mailBodySendWL;

This would load the corresponding language as given in the @page directive
(UICulture="aut o")
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

Aug 26 '08 #1
1 1735
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! |
*************** *************** **************
"Michael" <mi******@broad park.nowrote in message
news:EA******** *************** ***********@mic rosoft.com...
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.e mailBodySendWL;

This would load the corresponding language as given in the @page directive
(UICulture="aut o")
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
Aug 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4871
by: developer | last post by:
I have a Windows form that contains a datagrid populated with a table in my database. When i load my form i want a particular row in my datagrid to be selected. How can i do that Thanks
2
1762
by: Arjen | last post by:
Hello, I have 2 resource files. The resource files have both inside the name field values. I want to select from the first resource file the records where the name field haves a value between 1 and 25. Now I am doing this: XmlDocument xdResx = new XmlDocument(); xdResx.Load("Resources.resx");
6
2629
by: martin | last post by:
Hi, I have noticed that every aspx page that I created (and ascx file) has an assosiated resource file aspx.resx. However what I would like to do is have a single global resource file for the site. The resources in this global resource file will possibly change quite often, there I guess this rules out using web.config as every time web.config alters the application is recompiled, also I am not sure of the possible consequences of...
0
2547
by: mike | last post by:
Hi, When I programatically Bind a DataSource to DetailsView it does not fire "ModeChanged" event. This is first time i am trying to use ASP.NET DetailsView control. I have played with some of the sample provided by Microsoft and other comminity sites. Most of the samples were using Databinding using a DesignTime "SqlDataSource" Control and assigning its ID to DataSourceID property of DetailsView. However, in all of my application we DO...
8
12068
by: John Dunn | last post by:
Since currently we aren't allowed to have compiled XAML files embedded in C++ apps I'm using Markup::XamlReader::Load to dynamically load XAML files. This works perfectly fine with external files but I'd like to be able to load a file specified in a .resx resource. I've added my .xaml file to the .resx and can load it in using ResourceManager::GetObject(). The object returned is a System::Array^ which contains System::Byte objects. The...
4
21716
by: carson | last post by:
I have written two windows services: - service A does some crunching of local data files and uploads them to a central processing computer via http. - service B monitors a manifest file on a webserver to see if service A needs to be updated. What service B does if it sees their is an update for service A is to download a new copy of the service A executable, stop service A, replace the executable with the new copy, and start service B...
0
1223
by: Jürgen Heyn | last post by:
Good afternoon, I would like to display a bitmap in a PictureBox which is stored in a resource file. The following code works perfectly: picUser.Image = My.Resources.ResUserIcon01.x48_Crewmember From a database the application retrieves a string: "x48_Crewmember" (or "ResUserIcon01.x48_Crewmember")
2
2274
by: Nesster13 | last post by:
Hi, I am building an application that will utilize the local resource file. Right now the application is separated into two part, the header and the content. One of the line at the top of the header is "<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">" When I generate a local resource file what I see at the top of the resource file is "<?xml version="1.0" encoding="utf-8"?>". Now this will create a problem when I...
12
5261
by: TS | last post by:
i have a need to possibly enable mutli language support. What benefit do i get by using a resource file instead of a custom xml solution? thanks!
0
8407
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8319
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8837
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8512
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7347
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5638
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.