Localization error: Culture name 'auto' is not supported. Parameter name: name

 Hello,

 Well i am making a multi language website where users can pick there language

everything worked fine , but then this error popped up

Culture name 'auto' is not supported. Parameter name: name

i had this before , but then after a while it stopped giving the error

here is my code that gets the error

 

1        Protected Overrides Sub InitializeCulture()
2            Dim lang As String = Profile.LanguagePreference
3    
4            If lang IsNot Nothing Or lang <> "" Then
5                Thread.CurrentThread.CurrentUICulture = New CultureInfo(lang)
6                Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(lang)
7            End If

 Complete exception error

 

System.ArgumentException was unhandled by user code
  Message="Culture name 'auto' is not supported. Parameter name: name"
  ParamName="name"
  Source="mscorlib"
  StackTrace:
       at System.Globalization.CultureTableRecord..ctor(String cultureName, Boolean useUserOverride)    at System.Globalization.CultureTableRecord.GetCultureTableRecord(String name, Boolean useUserOverride)    at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride)    at System.Globalization.CultureInfo..ctor(String name)    at _Default.InitializeCulture() in C:\Documents and Settings\veronl\Desktop\gip\Carfil\Carfil.aspx.vb:line 465    at ASP.carfil_aspx.__BuildControlTree(carfil_aspx __ctrl) in C:\Documents and Settings\veronl\Desktop\gip\Carfil\Carfil.aspx:line 1    at ASP.carfil_aspx.FrameworkInitialize() in C:\Documents and Settings\veronl\Desktop\gip\Carfil\Carfil.aspx.vb:line 912308    at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    at System.Web.UI.Page.ProcessRequest()    at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)    at System.Web.UI.Page.ProcessRequest(HttpContext context)    at ASP.carfil_aspx.ProcessRequest(HttpContext context)    at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
  InnerException: 
 and the error i get at my webpage
 
 Culture name 'auto' is not supported.
Parameter name: name
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Culture name 'auto' is not supported.
Parameter name: name

Source Error:

Line 463:
Line 464:        If lang IsNot Nothing Or lang <> "" Then
Line 465:            Thread.CurrentThread.CurrentUICulture = New CultureInfo(lang)
Line 466:            Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(lang)
Line 467:        End If


Source File: C:\Documents and Settings\veronl\Desktop\gip\Carfil\Carfil.aspx.vb    Line: 465

Stack Trace:

[ArgumentException: Culture name 'auto' is not supported.
Parameter name: name]
   System.Globalization.CultureTableRecord..ctor(String cultureName, Boolean useUserOverride) +2907373
   System.Globalization.CultureTableRecord.GetCultureTableRecord(String name, Boolean useUserOverride) +414
   System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride) +48
   System.Globalization.CultureInfo..ctor(String name) +31
   _Default.InitializeCulture() in C:\Documents and Settings\veronl\Desktop\gip\Carfil\Carfil.aspx.vb:465
   ASP.carfil_aspx.__BuildControlTree(carfil_aspx __ctrl) in C:\Documents and Settings\veronl\Desktop\gip\Carfil\Carfil.aspx:1
   ASP.carfil_aspx.FrameworkInitialize() in C:\Documents and Settings\veronl\Desktop\gip\Carfil\Carfil.aspx.vb:912308
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +38
   System.Web.UI.Page.ProcessRequest() +86
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.carfil_aspx.ProcessRequest(HttpContext context) +29
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
  
i rly have no idea what could be wrong , if you need any further info just ask
 Signed Beguv 
 
 
0
Beguv
3/17/2008 12:18:20 PM
asp.net.localization 2171 articles. 0 followers. Follow

8 Replies
1539 Views

Similar Articles

[PageSpeed] 1

Hi,

I also faced this some days back, i guess just try Auto. Sometimes i guess it is case sensitive...

Let me know if u still face the same problem.


S.SRIRAM
0
s
3/17/2008 12:24:54 PM

Hi,

Use  culture="auto"    uiculture="auto"

For example, 

System.Globalization.CultureInfo lang;

lang = new System.Globalization.CultureInfo("en-US");

System.Threading.Thread.CurrentThread.CurrentCulture = lang;

System.Threading.Thread.CurrentThread.CurrentUICulture = lang;

 And Last but not the least,  have  you  created  the  Resource Files for the requested cultures..  

If  not  , then  create  resource file (.resx)   for  each  culture.

 

Hope  it helps you.  If  not, then  please  let me know.

 

---------

TALIB ALI KHAN

MICROSOFT CERTIFIED TECHNOLOGY SPECIALIST

 


Click "Mark As Answer" if it helped you.


TALIB ALI KHAN
MCTS
Welcome to TALIB's World



0
Talib_dotnet
3/17/2008 1:17:22 PM

 ?

im using vb.net , i added the recource file for the lang auto , but that doesn't make any difference at all 

0
Beguv
3/17/2008 2:32:02 PM

Hi,

If iam right if the user doesnt select any culture u want have the default culture.

If that is the case the use the code below.

 string culture = System.Globalization.CultureInfo.CurrentCulture.Name;

if(    )

{

      //User select his preference put it here.

}

System.Globalization.CultureInfo cultureInfo = new System.Globalization.CultureInfo(culture);

System.Threading.Thread.CurrentThread.CurrentCulture = cultureInfo;

System.Threading.Thread.CurrentThread.CurrentUICulture = cultureInfo;


S.SRIRAM
0
s
3/17/2008 2:36:10 PM

your right , but the code is in c# , and i only know vb.net :S

0
Beguv
3/17/2008 3:36:31 PM

 nvm got it

        Dim lang As String = Profile.LanguagePreference

        If lang IsNot Nothing Or lang <> "" Then
            Dim CultureInfo As System.Globalization.CultureInfo = New System.Globalization.CultureInfo(lang)
            Try
                System.Threading.Thread.CurrentThread.CurrentCulture = CultureInfo
            Catch ex As Exception

            End Try

            System.Threading.Thread.CurrentThread.CurrentUICulture = CultureInfo
        End If

0
Beguv
3/17/2008 3:48:35 PM

hi beguv...

i am using vs2005,web application...can u please help me in this query....

i need to develop a multi language website...can u please tell ,how can i do this...

thank  u

in advance...

0
mandavarama2005
3/18/2008 5:47:57 AM

 well i watched this video from this website about it then i implemented it in my program

look for localization or recources , its a very helpfull video 

0
Beguv
3/20/2008 10:55:38 PM
Reply:

Similar Artilces:

Culture name 'en_us' is not supported. Parameter name: name
I keep getting this error on my site.  Any advice on how to fix this issue?  I'm using the June CTP. Error in: http://www.mysite.com/atlasglob.axd Error Message: Culture name 'en_us' is not supported. Parameter name: name Referring Page: http://www.mysite.com/content/support/FAQ.aspx Stack Trace: at System.Globalization.CultureInfo.CreateSpecificCulture(String name) at Microsoft.Web.Globalization.AtlasCultureInfo.Create(String cultureName) at Microsoft.Web.Globalization.GlobalizationHandler.ProcessRequest(HttpContext context) at System.Web.HttpApplication.Call...

Culture name 'fr_fr' is not supported. Parameter name: name
Hello, In my web application, I don't use localization. Howerver, sometime I have this message : Culture name 'fr_fr' is not supported. Parameter name: name Pile : at System.Globalization.CultureInfo.CreateSpecificCulture(String name) at Microsoft.Web.Globalization.AtlasCultureInfo.Create(String cultureName) at Microsoft.Web.Globalization.GlobalizationHandler.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSync...

SqlBulkCopy: the locale id '0' of the source column '<column name> ' and the locale id '1033' of the destination column '<column name>' do not match.
Hi, I am using the sqlbulkcopy object to transfer large amount of data from one SQL server to Other. The code look like this.. SqlDataReader readerSrc = null;SqlBulkCopy bulkCopy = new SqlBulkCopy(connDest);//Prepare Destination Table.SqlCommand cmdDelete = new SqlCommand("DELETE FROM " + destTableName, connDest);//Set the sqlcommand textSqlCommand cmdGet = new SqlCommand("SELECT * FROM " + srcTableName, connSrc);//Open source connection.connSrc.Open();//Open destination connection.connDest.Open();int delete = cmdDelete.ExecuteNonQuery();//Get the data.readerSrc = cmdGet.ExecuteRead...

Error-Procedure 'SP Name' expects parameter '@Name', which was not supplied.
 I used grid view to delete one row.In that time i got the error like "Procedure 'SP Name' expects parameter '@Name', which was not supplied". My code is :protected void dgProject_RowDeleting(object sender, GridViewDeleteEventArgs e) {GridViewRow row = dgProject.Rows[e.RowIndex]; string a = row.Cells[1].Text;string b = row.Cells[2].Text; SqlDataSource1.ConnectionString = MyDataBase;SqlDataSource1.DeleteCommandType = SqlDataSourceCommandType.StoredProcedure; SqlDataSource1.DeleteCommand = "SP Name";SqlDataSource1.DeleteParameters.Add("Na...

Culture Name 'Home' is not supported error
I have 2 Rainbow RC4 websites which, seemingly at random, go down. An examination of the logs show the first error being the one in the subject. Subsequent errors vary but usually are either 'An Error Occurred In Global.asax when trying to get portalsettings. If the error is thread abort it means portalalias:Rainbow could not be found and the user was redirected.' or 'ERROR Rainbow - Failed to load languages, loading defaults' then followed by ' Culture name CultureList is not supported.' and ending with 'Could not load type 'Rainbow.Admin.AccessDeniedPage'. ...

Problem: The type 'typename' exists in both 'dll-name-1' and 'dll-name-2'
Hi at all!For some strange reason I sometimes (not always) get the following compilation error when starting my ASP.net project:Server Error in '/' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0433: The type 'ASP.formscontrols_worker_it_ascx' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0....

DataBinding: 'System.String' does not contain a property with the name 'Name'.
I keep getting this error "DataBinding: 'System.String' does not contain a property with the name 'Name'." when running the code below. I am trying to bind this to a datagrid. I'm confused as to where System.String comes into this and I can't find a property anywhere that is specified as 'Name' or should be 'Name'. The error occurs on the databind() attempt. Thanks!                  dt = new DataTable();          &nbs...

BESadmin error of 'The name could not be resolved. The name could not be matched to a name in the addresslist
HI guys this is probably something simple i am just not seeing.  I am configuring a BES server into a brandnew greenfield HMC4.5 environmnet.  I have created the BEsadmin account manually not using mps and given it all the appropriate permissions etc.  When I try and use the mapi profile tool i get the the name could not be resolved error. I even tried configuring up outlook on my laptop and tried to connect and get the same errror so not a BES only thing.  When i login to Webmail with the Besadmin users i can see the global address list and the besadmin account in it. ...

A local variable named '...' is already defined in this scope compile error
The following code throws a  "A local variable named 'decc' is already defined in this scope" error since the variable decc is defined twice.  I'm just trying to get reuse of code by using the same variable name and casting it to two different types.... is there some slick O.O. or other technique I can use to get this to work?  switch (cmd.Name)                {                    case &...

A local variable named 'chkDel' cannot be declared in this scope because it would give a different meaning to 'chkDel', which is already used in a 'parent or current' scope to denote something else???
Hi, I was using VB.NET to build a shopping cart (session("Cart")) using Data Table ... now I tried to convert into C# ... but I got error msg saying about the local variable 'chkDel' already been declared before ... it was fine in VB, what should I do??!! Please help, code below:- ===================================== public void submit(object s, EventArgs e) { CheckBox chkSelected = new CheckBox(); DataGridItem chkDel; int count; count = 0; // loop through the whole datagrid and find out how many item has been checked. foreac...

Item has already been added. Key in dictionary: 'Name' Key being added: 'Name'
I am trying to bind a hashtable to dropdopwlist as below but I get this:"Item has already been added. Key in dictionary: 'Name'  Key being added: 'Name'" Error. Any ideas?    Hashtable docs = new Hashtable();    foreach (string s in Roles.GetUsersInRole("Physician"))    {      ProfileCommon p = (ProfileCommon)ProfileCommon.Create(s);      string fullname = p.PersonalInfo.FirstName + " " + p.PersonalInfo.LastName;      docs.Add("Name", fullname);   &...

How to find/change the 'host' login name AND password, and the 'admin' name AND password...
Hey folks: I've seen this question asked a couple of times, but I've seen or am able to find an answer.  I am trying to find out *where* in the database the password is for anybody.  I have a weak memory, and what I've done pre-3.0 is just look at the Users table, to find out what I named the host/host and admin/admin logins and passwords. However, the password is no longer a column in that table.  And no where in the docs can I find a reference that states *WHERE* the passwords are stored, and how to view them.  Could someone help me out on this?  I *kn...

Can anyone see why I'm getting this error The column prefix 'dbo.PropertyForRentLocalized' does not match with a table name or alias name used in the query.
 Could someone please explain the likely root cause of this error.Thanks, andy. Server: Msg 107, Level 16, State 3, Line 16The column prefix 'dbo.PropertyForRentLocalized' does not match with a table name or alias name used in the query.Server: Msg 107, Level 16, State 1, Line 16The column prefix 'dbo.PropertyForRentLocalized' does not match with a table name or alias name used in the query.Server: Msg 107, Level 16, State 1, Line 16The column prefix 'dbo.PropertyForRentLocalized' does not match with a table name or alias name used in the query. CREATE ...

Compile error: The name 'dynamic control name' does not exist in the current context
I create a task bar line dynamically in default.aspx. The sub which creates this bar is conditionally called from Page_Load. This bar includes a dropdown, two boxes and a save button. I have created the save button as a link button so I can control the image ID and the text. I have created a server side event handler for the button click event which saves the values from the other controls within the task bar. default.aspx is a content page within nested master pages. On compilation I get:  Compiler Error Message: CS0103: The name 'ActivatePage' does not exist in the curr...

Web resources about - Localization error: Culture name 'auto' is not supported. Parameter name: name - asp.net.localization

Resources last updated: 1/14/2016 10:47:45 AM