.net - ChangeCulture: Culture name is not supported in C# Winform -


i have windows form application developed in vb.net target framework 3.5. application running in windows 7,8,8.1,10. in windows xp, showing error :

culture name 'en-in' not supported

i have checked code , find line causing error :

my.application.changeculture("en-in") 

when tried remove line, many forms , reports showing error or wrong information. can not remove line.

is there way install or load culture in windows ?

culture error

en-in not known culture code.

you can check existing codes in list.

you can create custom culture, using cultureandregioninfobuilder, it's highly unrecommended.

// create new culture, name desire cultureandregioninfobuilder cib = new cultureandregioninfobuilder("en-in", cultureandregionmodifiers.none);  // load defaults en-us cultureinfo ci = new cultureinfo("en-us"); cib.loaddatafromcultureinfo(ci);  // populate new cultureandregioninfobuilder object region information. regioninfo ri = new regioninfo("us"); cib.loaddatafromregioninfo(ri);  // can make changes, or finish. // changes can currency, regionname, etc.  // finish cib.register(); 

this article explains how it.

or can set custom culture :

dim customculture globalization.cultureinfo = new globalization.cultureinfo("en-us") customculture.datetimeformat.shortdatepattern = "dd-mmm-yyyy" customculture.datetimeformat.longdatepattern = "dd-mmm-yyyy hh:mm:ss"  customculture.datetimeformat.shorttimepattern = "hh:mm:ss" customculture.datetimeformat.longtimepattern = "hh:mm:ss" system.threading.thread.currentthread.currentculture = customculture system.threading.thread.currentthread.currentuiculture = customculture 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -