Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 245943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:07:51+00:00 2026-05-11T21:07:51+00:00

Is it possible to override the CurrentCulture and the CurrentUICulture for a specific control

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T21:07:51+00:00Added an answer on May 11, 2026 at 9:07 pm

    You can achieve that by instantiating the CultureInfo of your choice and pass that as a parameter to formatting functions (such as ToString). Just don’t assign it to Thread.CurrentThread.CurrentCulture or Thread.CurrentThread.CurrentUICulture, since that will change the culture for the application as such.

    In your code:

    CultureInfo myCulture = CultureInfo.GetCultureInfo("en-US");
    Console.WriteLine(DateTime.Now.ToString(myCulture));
    

    If your code executes external code, and you want to force this code to use your internally chosen culture, you can do that by creating a new thread, assign the culture to that thread and then have that thread execute the code. Just make sure to pay attention to the threading issues that comes with that approach.

    Thread sample:

    string formattedDate = string.Empty;
    Thread t = new Thread(delegate()
    {
        // call external code without specifying culture
        formattedDate = DateTime.Now.ToString();  
        waitHandle.Set();
    });
    t.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
    t.Start();
    waitHandle.WaitOne(); // wait for the thread to finish
    Console.WriteLine(formattedDate);
    

    As a last point; I don’t know why you want to override the CurrentCulture, but I would suggest that you think twice before doing so. Users are used to seeing dates an numbers formatted according to their locale; changing that could be confusing, especially if it happens in just one part of the UI.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to override the listview detault selection paint? The one that looks
Is it possible to override the standard layouts that are provided with Android? Is
Is it possible to override the Image constructor in JS? So that, for example,
Would it be possible to override the 'require' command so that it will try
Is it possible to override the to_sentence method just for one model in my
Is it possible to override a function based on the number of parameters that
I was wondering whether it's possible to override the arrow key functionality that is
I remember having read somewhere that it's possible to override the .init property of
I'm trying to override a specific function in kernel32.dll. Is it somehow possible to
Possible Duplicate: Override default php function Is there a way to detect that a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.