QuestionHow to determine current language ?

Posts 1–7 of 7 · Page 1 of 1
How to determine current language ?
How to determine current language of windows not application ?

now on pc it is En and when i click Alt + Tab it will change to Ar (= Arabic)

i want get current language of windows as string

Thanks in advance
Code:
Dim inputlang As String
Private Sub Form1_InputLanguageChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.InputLanguageChangedEventArgs) Handles Me.InputLanguageChanged
    Dim _inputlanguage As InputLanguage = InputLanguage.CurrentInputLanguage
    inputlang = _inputlanguage.LayoutName
End Sub
Something like that
Quote Originally Posted by Biesi View Post
Code:
Dim inputlang As String
Private Sub Form1_InputLanguageChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.InputLanguageChangedEventArgs) Handles Me.InputLanguageChanged
    Dim _inputlanguage As InputLanguage = InputLanguage.CurrentInputLanguage
    inputlang = _inputlanguage.LayoutName
End Sub
Something like that
it is not working always get us not ar

i want when my form starts MsgBox(my current windows language)

thanks any way
Quote Originally Posted by Ell0ll View Post
i want when my form starts MsgBox(my current windows language)
Code:
MsgBox(InputLanguage.CurrentInputLanguage.LayoutName)
Working fine for me
Code:
Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        MsgBox(InputLanguage.CurrentInputLanguage.LayoutName)
    End Sub
End Class
i always get US even if i changed the language to arabic
Quote Originally Posted by Ell0ll View Post
i always get US even if i changed the language to arabic
Because the language resets to default on a new application
Quote Originally Posted by Biesi View Post


Because the language resets to default on a new application
umm you are right now i got it after what you said >>> thanks
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us