cultureinfo Questions
5
I'm writing a custom string to decimal validator that needs to use Decimal.TryParse that ignores culture (i.e. doesn't care if the input contains "." or "," as decimal point separator).
This is the...
Postern asked 17/4, 2014 at 11:3
21
Solved
I'm wondering if there is a concise and accurate way to pull out the number of decimal places in a decimal value (as an int) that will be safe to use across different culture info?
For example:
19...
Selfcontent asked 20/11, 2012 at 16:31
3
Solved
I have the following unit test that I'm porting from a .Net Framework library to .Net core xunint test library. The project the unit test needs to be added to is
https://github.com/dotliquid/dotli...
Dibranchiate asked 13/9, 2017 at 13:16
4
Solved
I want to set default culture info for that class or for entire application.
For example in Turkey 3,2 = in english 3.2
so application uses my local but i want it to use as default
System.Globa...
Transnational asked 13/11, 2012 at 1:7
4
Solved
I need to store multiple currencies in SQL server. I understand that SQL won't support all different types of currencies (unless I store it as a string, but I don't want to do that).
My idea was t...
Panathenaea asked 2/5, 2010 at 14:8
1
I must write a stringToNumber parsing function that can use custom strings for the following:
decimal separator (. for en-US => 3.1415)
thousands separator (, for en-US => 1,000,000)
positive sig...
Lentissimo asked 3/10, 2017 at 7:6
18
Solved
I want to change persian numbers which are saved in variable like this :
string Value="۱۰۳۶۷۵۱";
to
string Value="1036751";
How can I use easy way like culture info to do this please?
my sa...
Jig asked 20/8, 2013 at 16:56
7
Solved
I have the code:
DateTime.Now.DayOfWeek.ToString()
That give's me the english day of the week name, I want to have the german version, how to add CultureInfo here to get the german day of the we...
Shockey asked 19/4, 2011 at 13:2
2
Replace German characters (umlauts, accents) with english equivalents
I need to remove any german specific characters from various fields of text for processing into another system which wont acce...
Mcloughlin asked 19/9, 2011 at 12:34
6
Solved
I have an application, which is based for India, and I'm setting Culture as:
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-IN");
The above code is called before the Window.Initiali...
Pilloff asked 17/9, 2011 at 10:16
8
Solved
I have this C# code for example
DateTime.Now.ToString("MMMM dd, yyyy");
Now the current thread is loading the Arabic culture. So the result is like this
???? 19, 2010
But i don't want the '20...
Mahan asked 19/2, 2010 at 17:4
2
Solved
Could you have a look at my sample?
This result produces from the following example:
var str = @"VIENNA IS A VERY BEAUTIFUL CAPITAL CITY.";
var title = new CultureInfo("en-US",...
Deleterious asked 28/5, 2021 at 10:33
8
Solved
Normally you can get it by writing something like
CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;
But this way you can only get CultureInfo which was configured at the moment ap...
Moynahan asked 9/10, 2009 at 7:48
8
Solved
I'm designing a multilingual application using .resx files.
I have a few files like GlobalStrings.resx, GlobalStrings.es.resx, GlobalStrings.en.resx, etc.
When I want to use this, I just need to s...
Murrah asked 16/2, 2009 at 13:7
4
Solved
I have this in my code:
var date1 = DateTime.ParseExact(date, "dd.MM.yyyy HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture);
And when my current cultur is dutch (nl-NL) instead of Ma...
Hagiocracy asked 10/12, 2012 at 8:58
6
Solved
I used the code below to get the list of culture type, is there a way on how to get just the country name?
Thank you
static void Main(string[] args)
{
StringBuilder sb = new StringBuilder();
fore...
Suttles asked 7/9, 2010 at 4:19
5
What is the simplest way to print c# DateTime in Persian?
currently I'm using :
static public string PersianDateString(DateTime d)
{
CultureInfo faIR = new CultureInfo("fa-IR");
faIR.DateTimeFor...
Enchilada asked 24/7, 2011 at 14:1
1
Solved
For a given .NET assembly compiled from C# (latest version), I would like to force all the string interpolations to systematically use CultureInfo.InvariantCulture instead of using CultureInfo.Curr...
Thai asked 31/8, 2020 at 16:19
7
Solved
I'm running a beta version of ReSharper, and it's giving me warnings for the following code:
int id;
// ...
DoSomethingWith(id.ToString());
The warning is on the id.ToString() call, and it's tel...
Menagerie asked 13/12, 2011 at 16:18
7
I have a decimal value ("133,3") stored in string column in the database, in norway culture.
after that user changed the regional setting to english-Us. when I convert "133,3" to decimal using Cul...
Allpowerful asked 1/12, 2011 at 13:0
3
Solved
We have two same letter 'ی' and 'ي' which the first came as main letter after windows seven.
Back to old XP we had the second one as main.
Now the inputs I get is determined as different if one cli...
Thermion asked 20/2, 2013 at 15:30
3
Solved
I have a problem with String.Format. The following code formats the string correctly apart from the first integer. Current culture is set to Iraqi arabic (ar-IQ):
int currentItem= 1;
string of= "م...
Dougdougal asked 16/6, 2010 at 16:18
8
Solved
Is there a way to get current information dynamically from the apps culture settings? Basically if the user has set the culture to US I want to know the currency is dollars, or if they have it set ...
Mcneal asked 4/5, 2010 at 6:1
10
Solved
Is there a way of setting culture for a whole application? All current threads and new threads?
We have the name of the culture stored in a database, and when our application starts, we do
Cultu...
Histamine asked 22/1, 2009 at 11:39
7
Do anyone have suggestion for writing culture sensitive ParseFloat Function in JavaScript, So that when I have a string 100,000.22 in US culture format the parse float function returns 100000.22 wh...
Aili asked 9/2, 2011 at 23:17
1 Next >
© 2022 - 2024 — McMap. All rights reserved.