Questions tagged [currentuiculture]
69 questions
2
votes
1 answer
What culture code should I use for Pinyin?
My Question
If you want to display Pinyin for Chinese-speaking users, in what "resource file" would you store the Pinyin translation?
Since Pinyin is NOT a "language" per se, but a Latin representation of Chinese characters, it does NOT have a…

SnookerC
- 160
- 2
- 11
2
votes
1 answer
ASP.NET Web Page Globalization & Localization in Master Page C# 3.0
I cant use the following code in Master page for Globalization & Localization. It gives the error as commented in the code part "does not contain a defination for InitializeCulture"
protected override void InitializeCulture()
{
if…

Learning
- 19,469
- 39
- 180
- 373
2
votes
0 answers
Set default language culture for each client connection blazor-server
I have a blazor-server app and am looking for a way to be able to set a default language based on preference for each client that connects to the app.
I currently have this code in Startup.Configure() that successfully sets a default language for…

Steve
- 21
- 1
2
votes
1 answer
What happens between Global.asax and MasterPage?
I am starting a multilanguage effort. In Global.asax.cs, method Application_BeginRequest(), a cookie is read and CurrentUICulture is set to en-US. However, in MyPage.aspx the value has surprisingly changed to nl.
Now this web site I inherited, and…

Roland
- 4,619
- 7
- 49
- 81
2
votes
4 answers
how to pass the selected culture into InitializeCulture() method
I have a login page where the user can select his language through a radio button, after login the user is redirected to Default.aspx where I'm using the below method to set the page culture:
<%@ Page Title="Home Page" Language="C#"…

Mohammad AlShaabi
- 79
- 6
2
votes
1 answer
Default string format in Silverlight
I've got a double, for example
double d = 4.323d;
And I want to display it in a TextBlock on a Silverlight 4 application, but the display should be this:
4.32
And I cannot change the StringFormat on the binding whatsoever.
The exception is that if…

Anemoia
- 7,928
- 7
- 46
- 71
2
votes
1 answer
Configure NLog to write exception messages in English
Is it possible to configure NLog to write the exception messages in English and not in the current thread culture?
It is probably possible to work around this issue by switching the current thread culture as proposed here Exception messages in…

sroll
- 752
- 7
- 20
2
votes
0 answers
Can't Apply Chinese Language through Resource File ASP.NET
when i use this code it should be changing the Language of the Site but in case of chinese it wont work
HttpContext.Current.Session["Lang"] = langId;
string langCode = "";
switch (langId)
{
case 0:
langCode = "ar-SA";
break;
…

Marwan
- 2,362
- 1
- 20
- 35
2
votes
1 answer
Correct Resx file not being chosen for non-base languages
I have a working resx localization setup with Microsoft MVC4 for base languages such as English, French, German, etc., but I'm trying to extend it to more specific languages such as Simplified/Traditional Chinese.
I have named my files with the…

Munk
- 153
- 1
- 7
2
votes
1 answer
How to fix CurrentUICulture when creating Threads
I'm using the CurrentUICulture for Localization. This works pretty well until the UI Culture is queried in a different Thread.
So my question is how to fix the CurrentUICulture so that it is fix also when I create a new thread.
Currently I'm setting…

BitKFu
- 3,649
- 3
- 28
- 43
1
vote
1 answer
CurrentUICulture MVC change
I have a website built in mvc3. I want to have an image of the Spanish flag and then when clicked on the site language changes to Spanish. I have not developed the site but i notice it is using CurrentUICulture. Im guessing i can trigger a function…

Beginner
- 28,539
- 63
- 155
- 235
1
vote
3 answers
Translation different from culture and ui culture in asp mvc 3 site
In my ASP MVC 3 site I added a folder Resources with 2 Resx files Strings.resx and Strings.fr-FR.resx, Acces modifier public, and provided translation.
I added in web.config:
…

addex03
- 197
- 1
- 2
- 12
1
vote
2 answers
Override CurrentCulture for WinForms control
Is it possible to override the CurrentCulture and the CurrentUICulture for a specific control in WinForms? So that this one specific control uses a different culture?

Martin Moser
- 6,219
- 1
- 27
- 41
1
vote
0 answers
Set CultureInfo.CurrentCulture sets also CurrentUICulture and vice versa
For some reason, when setting in my app CultureInfo.CurrentCulture to 'de-CH', it automatically sets CultureInfo.CurrentUICulture to 'de-CH' too. If I do it the inverse way, it is happenning too. My system is in 'en-US'
private void…

Esteban Chornet
- 928
- 3
- 14
- 38
1
vote
2 answers
PowerShell UICulture vs. Windows setting
During my tinkering with PS 5.1 under Win 10, related to the objective of question Fully change language (including Culture) for the current PowerShell session,
I came across a couple of related questions.
Where is the Windows setting associated…

sancho.s ReinstateMonicaCellio
- 14,708
- 20
- 93
- 185