473,326 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Culture settings

How do I change the culture settings of my aspx document written in vb.net
to UK English.

Thanks,
Nov 19 '05 #1
8 1585
set the thread's CurrentCulture and CurrentUICulture to en-GB:

CultureInfo c = new CultureInfo("en-GB"); //creates a CultureInfo instance
for British English
System.Threading.Thread.CurrentThread.CurrentCultu re = c; //Will
automatically format dates and such
System.Threading.Thread.CurrentThread.CurrentUICul ture = c; //Used by the
ResourceManager to get the correct XML File

if you are creating a multilingual application, check out:

http://openmymind.net/localization/index.html
and
http://openmymind.net/localization/index2.html

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"EmJayEm" <Wo*@eookie.com> wrote in message
news:mU******************@fe3.news.blueyonder.co.u k...
How do I change the culture settings of my aspx document written in vb.net
to UK English.

Thanks,

Nov 19 '05 #2
Thanks but is code this in VB.net?
EmJ.
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:OK****************@TK2MSFTNGP12.phx.gbl...
set the thread's CurrentCulture and CurrentUICulture to en-GB:

CultureInfo c = new CultureInfo("en-GB"); //creates a CultureInfo instance
for British English
System.Threading.Thread.CurrentThread.CurrentCultu re = c; //Will
automatically format dates and such
System.Threading.Thread.CurrentThread.CurrentUICul ture = c; //Used by the
ResourceManager to get the correct XML File

if you are creating a multilingual application, check out:

http://openmymind.net/localization/index.html
and
http://openmymind.net/localization/index2.html

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"EmJayEm" <Wo*@eookie.com> wrote in message
news:mU******************@fe3.news.blueyonder.co.u k...
How do I change the culture settings of my aspx document written in
vb.net
to UK English.

Thanks,


Nov 19 '05 #3
Also what namespaces do I need?
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:OK****************@TK2MSFTNGP12.phx.gbl...
set the thread's CurrentCulture and CurrentUICulture to en-GB:

CultureInfo c = new CultureInfo("en-GB"); //creates a CultureInfo instance
for British English
System.Threading.Thread.CurrentThread.CurrentCultu re = c; //Will
automatically format dates and such
System.Threading.Thread.CurrentThread.CurrentUICul ture = c; //Used by the
ResourceManager to get the correct XML File

if you are creating a multilingual application, check out:

http://openmymind.net/localization/index.html
and
http://openmymind.net/localization/index2.html

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"EmJayEm" <Wo*@eookie.com> wrote in message
news:mU******************@fe3.news.blueyonder.co.u k...
How do I change the culture settings of my aspx document written in
vb.net
to UK English.

Thanks,


Nov 19 '05 #4
it isn't much different:

Dim c as new CultureInfo("en-GB")
System.Threading.Thread.CurrentThread.CurrentCultu re = c
System.Threading.Thread.CurrentThread.CurrentUICul ture = c
CultureInfo is found in System.Globalization.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"EmJayEm" <Wo*@eookie.com> wrote in message
news:0H******************@fe3.news.blueyonder.co.u k...
Thanks but is code this in VB.net?
EmJ.
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:OK****************@TK2MSFTNGP12.phx.gbl...
set the thread's CurrentCulture and CurrentUICulture to en-GB:

CultureInfo c = new CultureInfo("en-GB"); //creates a CultureInfo instance for British English
System.Threading.Thread.CurrentThread.CurrentCultu re = c; //Will
automatically format dates and such
System.Threading.Thread.CurrentThread.CurrentUICul ture = c; //Used by the ResourceManager to get the correct XML File

if you are creating a multilingual application, check out:

http://openmymind.net/localization/index.html
and
http://openmymind.net/localization/index2.html

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"EmJayEm" <Wo*@eookie.com> wrote in message
news:mU******************@fe3.news.blueyonder.co.u k...
How do I change the culture settings of my aspx document written in
vb.net
to UK English.

Thanks,



Nov 19 '05 #5
I get the following error message:

Compiler Error Message: BC30188: Declaration expected.

Source Error:
Line 12:
Line 13: Dim c as new CultureInfo("en-GB")
Line 14: System.Threading.Thread.CurrentThread.CurrentCultu re = c
Line 15: System.Threading.Thread.CurrentThread.CurrentUICul ture = c
Line 16: I have included the system.Globalization namespace.

Can you help?
EmJ.

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:%2****************@TK2MSFTNGP14.phx.gbl...
it isn't much different:

Dim c as new CultureInfo("en-GB")
System.Threading.Thread.CurrentThread.CurrentCultu re = c
System.Threading.Thread.CurrentThread.CurrentUICul ture = c
CultureInfo is found in System.Globalization.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"EmJayEm" <Wo*@eookie.com> wrote in message
news:0H******************@fe3.news.blueyonder.co.u k...
Thanks but is code this in VB.net?
EmJ.
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:OK****************@TK2MSFTNGP12.phx.gbl...
> set the thread's CurrentCulture and CurrentUICulture to en-GB:
>
> CultureInfo c = new CultureInfo("en-GB"); //creates a CultureInfo instance > for British English
> System.Threading.Thread.CurrentThread.CurrentCultu re = c; //Will
> automatically format dates and such
> System.Threading.Thread.CurrentThread.CurrentUICul ture = c; //Used by the > ResourceManager to get the correct XML File
>
> if you are creating a multilingual application, check out:
>
> http://openmymind.net/localization/index.html
> and
> http://openmymind.net/localization/index2.html
>
> Karl
>
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
>
>
> "EmJayEm" <Wo*@eookie.com> wrote in message
> news:mU******************@fe3.news.blueyonder.co.u k...
>> How do I change the culture settings of my aspx document written in
>> vb.net
>> to UK English.
>>
>> Thanks,
>>
>>
>
>



Nov 19 '05 #6
The error is on line 14.

"EmJayEm" <Wo*@eookie.com> wrote in message
news:JS******************@fe3.news.blueyonder.co.u k...
I get the following error message:

Compiler Error Message: BC30188: Declaration expected.

Source Error:
Line 12:
Line 13: Dim c as new CultureInfo("en-GB")
Line 14: System.Threading.Thread.CurrentThread.CurrentCultu re = c
Line 15: System.Threading.Thread.CurrentThread.CurrentUICul ture = c
Line 16: I have included the system.Globalization namespace.

Can you help?
EmJ.

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:%2****************@TK2MSFTNGP14.phx.gbl...
it isn't much different:

Dim c as new CultureInfo("en-GB")
System.Threading.Thread.CurrentThread.CurrentCultu re = c
System.Threading.Thread.CurrentThread.CurrentUICul ture = c
CultureInfo is found in System.Globalization.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"EmJayEm" <Wo*@eookie.com> wrote in message
news:0H******************@fe3.news.blueyonder.co.u k...
Thanks but is code this in VB.net?
EmJ.
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:OK****************@TK2MSFTNGP12.phx.gbl...
> set the thread's CurrentCulture and CurrentUICulture to en-GB:
>
> CultureInfo c = new CultureInfo("en-GB"); //creates a CultureInfo

instance
> for British English
> System.Threading.Thread.CurrentThread.CurrentCultu re = c; //Will
> automatically format dates and such
> System.Threading.Thread.CurrentThread.CurrentUICul ture = c; //Used by

the
> ResourceManager to get the correct XML File
>
> if you are creating a multilingual application, check out:
>
> http://openmymind.net/localization/index.html
> and
> http://openmymind.net/localization/index2.html
>
> Karl
>
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
>
>
> "EmJayEm" <Wo*@eookie.com> wrote in message
> news:mU******************@fe3.news.blueyonder.co.u k...
>> How do I change the culture settings of my aspx document written in
>> vb.net
>> to UK English.
>>
>> Thanks,
>>
>>
>
>



Nov 19 '05 #7
Can you post your complete page? not getting the error...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"EmJayEm" <Wo*@eookie.com> wrote in message
news:JS******************@fe3.news.blueyonder.co.u k...
I get the following error message:

Compiler Error Message: BC30188: Declaration expected.

Source Error:
Line 12:
Line 13: Dim c as new CultureInfo("en-GB")
Line 14: System.Threading.Thread.CurrentThread.CurrentCultu re = c
Line 15: System.Threading.Thread.CurrentThread.CurrentUICul ture = c
Line 16: I have included the system.Globalization namespace.

Can you help?
EmJ.

"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:%2****************@TK2MSFTNGP14.phx.gbl...
it isn't much different:

Dim c as new CultureInfo("en-GB")
System.Threading.Thread.CurrentThread.CurrentCultu re = c
System.Threading.Thread.CurrentThread.CurrentUICul ture = c
CultureInfo is found in System.Globalization.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"EmJayEm" <Wo*@eookie.com> wrote in message
news:0H******************@fe3.news.blueyonder.co.u k...
Thanks but is code this in VB.net?
EmJ.
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:OK****************@TK2MSFTNGP12.phx.gbl...
> set the thread's CurrentCulture and CurrentUICulture to en-GB:
>
> CultureInfo c = new CultureInfo("en-GB"); //creates a CultureInfo

instance
> for British English
> System.Threading.Thread.CurrentThread.CurrentCultu re = c; //Will
> automatically format dates and such
> System.Threading.Thread.CurrentThread.CurrentUICul ture = c; //Used by

the
> ResourceManager to get the correct XML File
>
> if you are creating a multilingual application, check out:
>
> http://openmymind.net/localization/index.html
> and
> http://openmymind.net/localization/index2.html
>
> Karl
>
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
>
>
> "EmJayEm" <Wo*@eookie.com> wrote in message
> news:mU******************@fe3.news.blueyonder.co.u k...
>> How do I change the culture settings of my aspx document written in
>> vb.net
>> to UK English.
>>
>> Thanks,
>>
>>
>
>



Nov 19 '05 #8
I found an easier way is just to do this:

<%@ Page Language="VB" Culture="en-GB" %>

This changes the date validation to English format d/m/yyyy

Thanks,
Nov 19 '05 #9

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

Similar topics

2
by: Aliasgar Pocketwala | last post by:
Hi, I have an asp.net application that is using the wrong culture. I cant figure out where does it get its setting from. My web application runs as a specific user since so that I can give it...
3
by: Ashish | last post by:
I have a application in which culture settings are customizable, they dont depend on the machine settings on which the application is running, I need to make sure that all the threads running in...
1
by: Ya Ya | last post by:
I am developing a DLL (class library) for a web application of mine. In the web.config of the web application I have set: culture="en-GB" uiCulture="en" in order that the date format will be...
2
by: Lars Netzel | last post by:
Somone told me that you should always take care of Culture settings in the application by setting a Culture ISO thing on some Thread that ASP is runing on.. so that decimals and thousand separators...
0
by: saleek | last post by:
Hi all, I am using a free currency exchangerate webservice to update figures on my web page. The code is fairly simple and works well for UK, and US Dollars - but for some reason I cannot get...
0
by: Dan | last post by:
Hi, I'm having a really basic problem parsing a simple UK date string. The following line works fine in a WinForms app, but not in my ASP.net form: DateTime dt = DateTime.Parse("23/10/2005",...
24
by: ru | last post by:
I got an error message from a client running my software, and after building a test machine with the exact regional settings as my client I could reproduce the bug. The setting causing the bug...
2
by: Jack Russell | last post by:
If I set my culture to French with Thread.CurrentThread.CurrentUICulture = New CultureInfo("fr-FR") then write a string using tostring it does not use the French separator (comma) but instead uses...
2
gchq
by: gchq | last post by:
Hi there I've come across an odd one! Running a sub as a seperate thread it is thowing an exception when it hits Dim vInvDate as Date = TextBox10.Text Conversion to string "08/21/2007" to...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.