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 7397931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T03:48:32+00:00 2026-05-29T03:48:32+00:00

i am working with a winform application , and in the richbox_textchange i would

  • 0

i am working with a winform application , and in the richbox_textchange i would like to detect whether the entered text is English or not because if it is english i`ll perform LeftToRight typing else RightToLeft typing .

I used that code :

    private void richTextBox1_TextChanged(object sender, EventArgs e)
    {
        if (CultureInfo.CurrentCulture.TextInfo.IsRightToLeft)
        {
            label1.Text = "RTL";
        }
        else
        {
            label1.Text = "LTR";
        }
    }

but i always get : LTR only , label1 never change text to RTL even if i typed arabic !!!

EDIT : ANSWERED !!

Firstly Thanks to everybody for helping me here and especially Oded , here is the solution i could figure out

    private void richTextBox1_TextChanged(object sender, EventArgs e)
    {
        if (InputLanguage.CurrentInputLanguage.Culture.TextInfo.IsRightToLeft)
        {
            label1.Text = "RTL";
        }
        else
        {
            label1.Text = "LTR";
        }
    }
  • 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-29T03:48:33+00:00Added an answer on May 29, 2026 at 3:48 am

    You need to add the correct namespace to the top of your class:

    using System.Globalization;
    

    At this point the CultureInfo and TextInfo classes will be available directly.


    Update:

    It appears that you are trying to find out the current input language. Take a look at the InputLanguage class and its methods. It is in the System.Windows.Forms namespace.

    InputLanguage.CurrentInputLanguage.Culture.TextInfo.IsRightToLeft
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a WinForm .Net application with the basic UI that includes toolbar
Good morning, I am working on a C# winform application that is using validation
I'm working with an n-Tier application using WinForm and WCF Engine Service (Windows Service)
I'm having some serious issues with a WinForm application that I'm working on. Currently,
I'm working on an rather small application (C#, winform) that is kind of front-end
I am working on a C# WinForm application. I want to trigger some processing
I am working with a WinForm application that was designed by the previous, now
I'm working on a WinForm application. I've implemented data-access logic into a library project
I am working on a WinForm Application. The Form has many fields/components but is
I'm working on a WinForms application. I'd like to know if chrome is installed

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.