dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Sep 23, 1999

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


Retrieve Localization Strings

Use this API function wrapper to retrieve localization and personalization information:
 
Private Declare Function GetLocaleInfo Lib _
	"kernel32" Alias "GetLocaleInfoA" (ByVal _
	Locale As Long, ByVal LCType As Long, ByVal _
	lpLCData As String, ByVal cchData As Long) _
	As Long 

Public Function WinLocaleInfo(ByVal lnfoType As _
	Long) As String
	Dim sLCData As String
	Dim nRet As Long

	nRet = GetLocaleInfo(0, lnfoType, sLCData, 0)
	If nRet Then
		sLCData = Space$(nRet)
		nRet = GetLocaleInfo(0, lnfoType, _
			sLCData, Len(sLCData))
		If nRet Then
			WinLocaleInfo = Left$(sLCData, nRet)
		End If
	End If
End Function
Here are some of the handier parameters you can use for information:
 
	LOCALE_SCURRENCY = &H14
	' local monetary symbol
	LOCALE_SDATE = &H1D
	' date separator
	LOCALE_SDAYNAME1 = &H2A
	' long name for Monday
	LOCALE_SDECIMAL = &HE
	' decimal separator
Brian Morris
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date