System caption (again)

  • Thread starter Thread starter Wally
  • Start date Start date
W

Wally

Hi all.
I need to retrieve caption of system buttons. For example: in italian o.s.
Cancel button is "Annulla", in english o.s. it is "Cancel" and so on. I need
to install my application on different operative systems. Is there an API or
another way to retrieve those system caption?

Thanks.

W
 
I've found a vb6 example:
(you must do the translation yourself)

'0 = Language Neutral
'1024 = Process Default Language
'1030 = Danish
'1031 = German (Standard)
'1032 = Greek
'1033 = English (United States)
'2057 = English (United Kingdom)
'3081 = English (Australian)
'4105 = English (Canadian)
'5129 = English (New Zealand)
'6153 = English (Ireland)
'7177 = English (South Africa)
'8201 = English (Jamaica)
'9225 = English (Caribbean)
'10249 = English (Belize)
'11273 = English (Trinidad)
'1034 = Spanish (Traditional Sort)
'3082 = Spanish (Modern Sort)
'1035 = Finnish
'1036 = French (Standard)
'1040 = Italian (Standard)
'1043 = Dutch (Standard)
'2067 = Dutch (Belgian)
'1044 = Norwegian (Bokmal)
'2068 = Norwegian (Nynorsk)
'1045 = Polish
'2070 = Portuguese (Standard)
'1049 = Russian

Private Declare Function VerLanguageName Lib "kernel32" Alias
"VerLanguageNameA" (ByVal wLang As Long, ByVal szLang As String, ByVal nSize
As Long) As Long

Private Sub Form_Paint()
'KPD-Team 2000
'URL: http://www.allapi.net/
'E-Mail: (e-mail address removed)

Dim Buffer As String
Buffer = String(255, 0)
VerLanguageName 2067, Buffer, Len(Buffer)
Buffer = Left$(Buffer, InStr(1, Buffer, Chr$(0)) - 1)
MsgBox Buffer
End Sub
 
dick said:
I've found a vb6 example:
(you must do the translation yourself)

'0 = Language Neutral
'1024 = Process Default Language
'1030 = Danish
'1031 = German (Standard)
'1032 = Greek
'1033 = English (United States)
'2057 = English (United Kingdom)
'3081 = English (Australian)
'4105 = English (Canadian)
'5129 = English (New Zealand)
'6153 = English (Ireland)
'7177 = English (South Africa)
'8201 = English (Jamaica)
'9225 = English (Caribbean)
'10249 = English (Belize)
'11273 = English (Trinidad)
'1034 = Spanish (Traditional Sort)
'3082 = Spanish (Modern Sort)
'1035 = Finnish
'1036 = French (Standard)
'1040 = Italian (Standard)
'1043 = Dutch (Standard)
'2067 = Dutch (Belgian)
'1044 = Norwegian (Bokmal)
'2068 = Norwegian (Nynorsk)
'1045 = Polish
'2070 = Portuguese (Standard)
'1049 = Russian

Private Declare Function VerLanguageName Lib "kernel32" Alias
"VerLanguageNameA" (ByVal wLang As Long, ByVal szLang As String, ByVal nSize
As Long) As Long

Private Sub Form_Paint()
'KPD-Team 2000
'URL: http://www.allapi.net/
'E-Mail: (e-mail address removed)

Dim Buffer As String
Buffer = String(255, 0)
VerLanguageName 2067, Buffer, Len(Buffer)
Buffer = Left$(Buffer, InStr(1, Buffer, Chr$(0)) - 1)
MsgBox Buffer
End Sub
Thank you for answer. But I'm looking for a method to retrieve these system
caption (in the language of O.S.) without translate their. Bye.

W
 
* "AlexS said:
Did you try SendMessage with WM_GETTEXTLENGTH and WM_GETTEXT?
?!?
Private Declare Function VerLanguageName Lib "kernel32" Alias
"VerLanguageNameA" (ByVal wLang As Long, ByVal szLang As String, ByVal [...]
Thank you for answer. But I'm looking for a method to retrieve these system
caption (in the language of O.S.) without translate their. Bye.

'VerLanguageName' is used to get the name of a language as string, it
won't solve your problem.
 
Start with first and then proceed with second.

HTH
Alex

Herfried K. Wagner said:
* "AlexS said:
Did you try SendMessage with WM_GETTEXTLENGTH and WM_GETTEXT?
?!?
Private Declare Function VerLanguageName Lib "kernel32" Alias
"VerLanguageNameA" (ByVal wLang As Long, ByVal szLang As String, ByVal [...]
Thank you for answer. But I'm looking for a method to retrieve these system
caption (in the language of O.S.) without translate their. Bye.

'VerLanguageName' is used to get the name of a language as string, it
won't solve your problem.
 
* "AlexS said:
Start with first and then proceed with second.

I doubt that you understood the question. On what window would you use
'WM_GETTEXT', and for what reason?
 
* "AlexS said:
On control itself. To get the caption text. Original question was about
button.

The original question was about how to get the localized strings for
Cancel, OK, Abort, Retry, etc. buttons.
 
Back
Top