Retrieving lanuage setting

I am creating a multilanguage VB application. When I change the language and step through the application, the new language is recognized and the form is loaded correctly.  At runtime the same exact code displays  the form in English ALWAYS.  I am trying to use the SetThreadLocale api. If anyone has any suggestion please let me know
rjohns621Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TaconvinoCommented:
Just a thought: SetThreadLocale only works on NT.

TCV
0
rjohns621Author Commented:
I am using Windows XP
0
rjohns621Author Commented:
I am using Windows XP
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

rjohns621Author Commented:
I am using Windows XP
0
TaconvinoCommented:
OK. This is from Microsoft:
"Windows 2000/XP: Do not use SetThreadLocale to select a UI language. To select the proper resource that is defined with a LANGUAGE statement, use FindResourceEx."

Ref:: http://msdn.microsoft.com/library/en-us/intl/nls_52lh.asp

TCV
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bziherlCommented:
1. Download this module:

http://www.trigeminal.com/code/LcidCp.bas

2. Create the following sub to check either your system language is english, spanish, german... (see the module for other constants):

Public Sub CheckLanguage()

    ' Function GetPLId returns language ID
    Select Case GetPLId
        Case LANG_ENGLISH ' English
            MsgBox "Your language is English."
        Case LANG_SPANISH ' Spanish
            MsgBox "Your language is Spanish."
        Case LANG_GERMAN ' German
            MsgBox "Your language is German."
        Case LANG_ITALIAN ' Italian
            MsgBox "Your language is Italian."
        Case LANG_SLOVENIAN ' Slovenian
            MsgBox "Your language is Slovenian."
        ' Others...
    End Select

End Sub


Hope this will help you,
Blaz
0
rjohns621Author Commented:
Blaz,
that was a very interesting module.  However, I am trying to change the Lanuguage or get VB to recognize the language at runtime.  How do you get VB to recognize the language setting?
0
TaconvinoCommented:
You can always use GetLocaleInfo.

TCV
0
rjohns621Author Commented:
I have not problem geeting the LCID..  The problem is setting it.  Nothing seesm to work as far as setting it.  
0
rjohns621Author Commented:
I have not problem geeting the LCID..  The problem is setting it.  Nothing seesm to work as far as setting it.  
0
TaconvinoCommented:
That's a problem, because SetLocaleInfo will change the LCID for the current user (affecting all applications).
0
rjohns621Author Commented:
It does not matter if it affects all applications.  I will try the SetLocalInfo.  What is really tricky is that the VB app detects the lauguage in design mode but at runtime, the application will only come up English
0
rjohns621Author Commented:
It does not matter if it affects all applications.  I will try the SetLocalInfo.  What is really tricky is that the VB app detects the lauguage in design mode but at runtime, the application will only come up English
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.