Ticket T144164
Visible to All Users

How to change the culture in the project.

created 11 years ago

[DevExpress Support Team: CLONED FROM T144085: How to set the currency symbol on EditMask property - £ C2 (£ 2,234.23)]
Could you please tell me how to change the culture in the project.

Answers approved by DevExpress Support

created 11 years ago (modified 11 years ago)

To change the culture of the application, use the approach from the following MSDN topicfor further information:
How to: Set the Culture and UI Culture for Windows Forms Globalization

For example, if you need to change the culture to "en-GB", use the following code:

C#
static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Thread.CurrentThread.CurrentCulture = new CultureInfo("en-GB"); // <--- Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-GB"); Application.Run(new Form1()); } }
    Comments (2)

      Thanks.
      Could you please provide a sample solution on the same please…

      DevExpress Support Team 11 years ago

        It turns out that to accomplish this task, it is only necessary to change the Thread.CurrentThread.CurrentCulture. I've updated my answer accordingly. Please check it.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.