How to get the language type of the operating system
Source: Internet
Author: User
Today, the Netizen asked the question:
"For example: when I run on the Chinese version of Win2000, I can get the language version of the operating system in Chinese, when I run it in the Win2000 English version, I know it's English."
Here I write a function for ease of use. (Only get simplified, traditional, and English, others add bar ^_^) The code is as follows:
Private Declare Function getsystemdefaultlcid Lib "kernel32" () as Long
Private Sub Command1_Click ()
MsgBox Getostype, vbOKOnly, "hint"
End Sub
Function Getostype () as String
DIM ret as String
Select case Hex (GETSYSTEMDEFAULTLCID)
Case 804:
ret = "Chinese Simplified (mainland)"
Case 404:
ret = "Chinese Traditional (Taiwan)"
Case 409:
ret = "English"
Case Else:
ret = "Other language system"
End Select
Getostype = RET
End Function
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.