Answered by:
Single web application showing same information but in different lanaguages

Question
-
User-1220497221 posted
Hi, all
I'm uisng asp.net 2.0 and VS2005
I wanna know if anyone can suggest methods for the following scenarios:
The application is being done in two lanaguages such as english and french.
1) An English web server hosting the application. I would like to know if I'm using country flags, how to change the content to be read in the chosen language since i'll be using only a single page.
2) Same as 1 but the application is being hosted on a french web server. there's prob with the date format
Thanks in advance
Dave
Wednesday, August 8, 2007 2:10 PM
Answers
-
User-1217497702 posted
Hi,
I think that satellite assemblies is what you are looking for:
http://msdn.microsoft.com/en-us/library/21a15yht(VS.71).aspx
http://www.codeproject.com/aspnet/SatelliteAssemblies.asp
You can chnage the date format by chnaging the current culture or by printing in specific culture info for example:
DateTime date = DateTime.Now;
string dateAsString = date.ToString(new System.Globalization.CultureInfo("en-US").DateTimeFormat);
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, August 9, 2007 4:45 AM -
User-1217497702 posted
Hi, mate
I think this video will help you: http://www.asp.net/learn/videos/video-40.aspx
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, August 13, 2007 2:26 AM -
User-1220497221 posted
Finally I'll use what was taught in the video + the resources.
It's working perfectly
Cheers
Dave
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, August 30, 2007 1:40 AM
All replies
-
User-319574463 posted
Look at http://www.guysmithferrier.com/ and in particular at Guy Smith's book ISBN 0321341384. The book is available online at Safari books at http://safari.oreilly.com/0321341384
Wednesday, August 8, 2007 5:44 PM -
User-1220497221 posted
Thanks
DO you know a way to get information abt the installation language of w2k3 + asp.net?
Thursday, August 9, 2007 1:40 AM -
User-1974636474 posted
System.Globalization.
CultureInfo.InstalledUICulture maybe?Thursday, August 9, 2007 3:54 AM -
User-1217497702 posted
Hi,
I think that satellite assemblies is what you are looking for:
http://msdn.microsoft.com/en-us/library/21a15yht(VS.71).aspx
http://www.codeproject.com/aspnet/SatelliteAssemblies.asp
You can chnage the date format by chnaging the current culture or by printing in specific culture info for example:
DateTime date = DateTime.Now;
string dateAsString = date.ToString(new System.Globalization.CultureInfo("en-US").DateTimeFormat);
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, August 9, 2007 4:45 AM -
User-1220497221 posted
Thnks mystery,
I'll try it.
Let say I install a french web server and add my web application.
In the page_load , should I put the following code:
1 Dim language
2 language = Split(Request.ServerVariables("HTTP_ACCEPT_LANGUAGE"), ",")
3
4 dim strLanguage as string
5
6 strLanguage=left(Lcase(language(0)),2)
7
8 select case strLanguage
9
10 case "en"
11
12 dateAsString = date.tostring(new system.globalization.cultureInfo("en-us").DatetimeFormat)
13
14 case "fr"
15
16 dateAsString = date.tostring(new system.globalization.cultureInfo("fr-fr").DatetimeFormat)
17
18 case else
19
20 End select
21
Thnks in advance
Regard,
Dave
Monday, August 13, 2007 2:07 AM -
User-1217497702 posted
Hi, mate
I think this video will help you: http://www.asp.net/learn/videos/video-40.aspx
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, August 13, 2007 2:26 AM -
User-1220497221 posted
Thanks pal
I'll view it
Monday, August 13, 2007 3:13 AM -
User-1220497221 posted
Finally I'll use what was taught in the video + the resources.
It's working perfectly
Cheers
Dave
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, August 30, 2007 1:40 AM