Questions tagged [currentuiculture]
69 questions
0
votes
1 answer
Store DateTime according to Current CultureInfo ASP.NET Core
My application server in a location different from where most of my application users currently are.
While storing datetime values, I realize that if I simply do this
`TimeAdded=DateTime.Now`,
the Time is stored according to the server location…

Josh
- 1,660
- 5
- 33
- 55
0
votes
0 answers
lock Thread.CurrentThread.CurrentUICulture
I've a method that runs an action with a specific CurrentUICulture and at the end it rolls back to the original CurrentUICulture. Here's the snippet
private static void ExecuteInLanguage(string language, Action action)
{
var current…

Massimo Variolo
- 4,669
- 6
- 38
- 64
0
votes
2 answers
ASP.net Maintaining CurrentUICulture for bookmarks and linked urls
So I have a website that is in two different languages and I've set it up to pull text from a resources file based on CurrentUICulture.
I have two link buttons that a user can click to switch between english and…

PercivalMcGullicuddy
- 5,263
- 9
- 46
- 65
0
votes
0 answers
Windows Service unable to set language using CurrentCulture
I have a two resource files in my windows service for the purpose of localization (English and French).
These resource files contain messages that I want to show the user after the service completes its task. The language in which I want to show…

Rida Iftikhar
- 186
- 3
- 16
0
votes
0 answers
CurrentCulture different from CurrentUICulture - Issue with particular software - Windows Server 2012
I'm trying to remotely use a software called Sunetplus installed on a local machine from a Windows 2012 Server. I only have to run a line in the command prompt to do what I have to do (which is import new data in the software database). The command…
0
votes
2 answers
Return Datetime.Day in persian culture by c#
I intend to return the day of the month in Persian culture. I have already set the culture and it works well. the day which shows is in Persian calendar. But I need to check somewhere the exact day of the month,
for example today is 2018-2-3 and in…

Azzurro94
- 479
- 1
- 7
- 19
0
votes
2 answers
How to change the Numeric seperator in DataGrid?
I have an query with number format.When changed the decimal separator(.) ---> (,) by using Region settings, type the (1.5) in excel sheet it will changed as (1,5) correctly.
My problem is in DataGridView control, I followed the same procedure in…

Prithiv
- 504
- 5
- 20
0
votes
1 answer
Thread.CurrentThread.CurrentUICulture doesn't return country correctly
I'm with a very strange problem. I am implementing localization on my project, but when I try to get the current locale Windows is running, it misses the country information. Here it is a sample code:
using System;
using…

Leonardo Alves Machado
- 2,747
- 10
- 38
- 53
0
votes
2 answers
Invalid datetime format exception for Norwegian culture
In my web.config file I have this line:
ASP.Net nicely takes care of all date/time formats. Applying the…

EvilDr
- 8,943
- 14
- 73
- 133
0
votes
2 answers
Force date format regardless of culture
I have an issue with certain cultures (Spanish in particular), causing the date string, ToShortDateString(), to come in as dd/mm/yyyy
where END_DATE between '" + asOfDate.AddDays(-30).ToShortDateString() + "' and '" +
This is causing SQL sever…

Slinky
- 5,662
- 14
- 76
- 130
0
votes
1 answer
ASP.NET webcontrols render wrong in different culture settings
I have a self defined web control.
Some code in a loop:
double cellHeight = 12.34;
Label dcell = new Label();
dcell.Style["height"] = cellHeight + "pt";
dcell.Text = cellHeight;
If I use…

user1614536
- 25
- 4
0
votes
5 answers
Thread.CurrentThread.CurrentUICulture not working consistently
I've been working on a pet project on the weekends to learn more about C# and have encountered an odd problem when working with localization. To be more specific, the problem I have is with…

xTRUMANx
- 1,035
- 1
- 8
- 12
0
votes
1 answer
How to Show Image based on Current Culture
I have images that I would like to show within a CustomMessageBox, that have text within them, based upon the user's current language settings on their device. I do not want to make the mistake of showing a user an image with a language they would…

Matthew
- 3,976
- 15
- 66
- 130
0
votes
2 answers
Configuring CurrentCulture and CurrentUICulture with different parameters
I am using c#.net3.5 and I want to change currentculture setting's decimal seperator from comma to dot, but at the same time I want user can use commas in numericupdown controlles as decimal seperator.
So I tried to change my culture setting as…

Rapunzo
- 966
- 5
- 21
- 42
0
votes
1 answer
Asp.Net Culture name without region/country name and default settings
I am working a multi-lang site. I want to get and set culture and uiculture with culturename without countryname. If browser is english or lang is English choosen, it will return en not en-US or en-GB. Because I use one localresources file per…

user3318568
- 3
- 2