cultureinfo Questions
4
Solved
I'm currently working on a small program which I want to show the date and time clearly and according to cultureinfo, like this:
Sunday, march 3. 2017 7:46:57 AM
However, I want it to be possible ...
Trapper asked 12/3, 2017 at 7:10
2
Solved
I am trying to localize responses of my web api.
I created a Resource file (Messges.resx) in my project containing all the strings that are localized. And using Accept-Language header to identify ...
Crumpton asked 26/2, 2017 at 20:49
5
What is best practice for the scenario listed below?
We have an application which we would like to support multiple currencies. The software will respect the users locale and regional settings to ...
Chockfull asked 24/4, 2009 at 7:0
2
Solved
I need to format a number, based on a culture, but all I have is the Accept-Language from the HTTP request, which is a two-letter code like fr (for French)
Is this enough to create a CultureInfo t...
Forfeit asked 30/1, 2017 at 15:26
2
Solved
After recently finding an error that was due to not specifying InvariantCulture when parsing text into numbers, I wanted to beef up our unit tests so that they would catch the issue. I wrote a new ...
Cathartic asked 3/9, 2015 at 18:21
3
I'm trying to get my clients' country, so I use CultureInfo.CurrentCulture. Problem is that when my Canadian customers use my website, they're showing up as American.
It looks like CultureInfo.Cur...
Guesswarp asked 28/6, 2010 at 17:9
1
Solved
Today I came across a strange phenomenon I can't really explain. There's a webpage with a number of rows in a gridview, which need to be saved to the database and to an XML file one by one. I ended...
Merchant asked 30/11, 2016 at 19:18
5
Is it possible to define a default number format that is used whenever I convert an integer (or double etc.) to a String without specifying a format string?
C# example:
int i = 123456;
string s ...
Veradis asked 26/2, 2014 at 12:33
2
Solved
I'm working on a SL5 app with C# and I'm looking to internationalize it. I found the following to set the UI culture:
var culture = new CultureInfo(Thread.CurrentThread.CurrentUICulture.TwoLetterI...
Ladylove asked 6/2, 2012 at 14:58
3
Solved
I want to set my application culture to whatever I want, regardless of what the OS culture is. To obtain this I used CultureInfo class with "fa-IR" as culture, but it used the "GregorianCalendar" a...
Borlow asked 15/2, 2011 at 9:39
1
Solved
In Australia, A client has been entering "1/5" as a shortcut for the first day of May. We have just moved from Windows Server 2008 to Windows Server 2012.
Using the following code in Linq...
Cerulean asked 7/7, 2016 at 0:20
2
I've got a TextBox bound to a nullable DateTime property.
I'm in Australia, so I want dates presented in the d/mm/yyyy format.
On my Windows 7 box, I can enter the date in d/mm format, and it's c...
Azo asked 4/11, 2012 at 0:2
1
In my application I needed to display currency conversion.
For eg:
1 ₹= 0.015 $
Similarly I want to display the conversion from AED to USD . When I try, the conversion equation gets distorted.
...
Langobardic asked 4/7, 2016 at 7:46
2
Solved
I have an owin culture middle ware running very nice.
It just changes the culture according to the url. This works in 4.5.* perfectly. Now when the runtiome is changed to 4.6.1, the culture isn't ...
Aperture asked 6/4, 2016 at 15:35
7
I would like to make sure that certain numbers in my application are printed without any separators, groupings etc. no matter what the current environment is. It seems that the following two method...
Heave asked 28/9, 2009 at 14:59
5
Solved
In .NET there is the CultureInfo class in the System.Globalization namespace. It has two similar properties both returning values of the CultureInfo type: CurrentCulture and CurrentUICulture.
What...
Blocked asked 30/11, 2008 at 16:26
3
I am trying using c# to get the country name from a country code
For example :
fr-fr gets me France
it-it gets me Italy
The problem with my code is that I am not getting the name but a informa...
Spleenwort asked 24/4, 2016 at 9:30
1
Preface: I know how to create a read-only CultureInfo object. That is not the question and it has been answered in detail here:
CultureInfo thread safety
Note that the text of that question is ...
Falk asked 21/4, 2016 at 10:19
2
Solved
When we use static double values in XAML, how can we specify in which format they are provided?
Example:
<Rectangle>
<Rectangle.Opacity>
<Binding Path="IsDimmed" Converter="{Stat...
Tensor asked 16/4, 2014 at 14:1
2
Solved
I'm experiencing weird behavior when converting a number to a double, when using culture information.
When converting "3,3" using the Dutch culture, is handled correctly. If I convert "3,3" using t...
Spar asked 27/1, 2016 at 9:50
2
Solved
I was wondering why ReSharper does warn me, when I'm trying to convert a char to a string without giving a specific culture info.
Is there any case, where it could be converted differently on two ...
Volny asked 11/1, 2016 at 8:34
3
Solved
I'm modifying a globalized web application which uses stored CultureInfo for each logged in user.
The client would like time data entry to be localized. Displaying is not a problem as the formatt...
Rilke asked 16/7, 2009 at 1:25
1
Solved
I have the following code to get a list of Month names:
var monthNames = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.MonthNames;
For some reason, this keeps returning an addit...
Claudetteclaudia asked 4/12, 2015 at 1:18
5
i have a list of email addresses of people that have different nationalities (for each person i have the iso code)
when i send the email to all these people, in the text of the mail i need to to c...
Florescence asked 26/1, 2012 at 17:4
3
Solved
I cam trying to convert a datetime to string and back, but making it so that it works for all cultures.
I basically have a Textbox (tbDateTime) and a label (lbDateTime). The label tells the user, ...
Panto asked 5/5, 2011 at 7:9
© 2022 - 2024 — McMap. All rights reserved.