Exit Posted February 8, 2013 Share Posted February 8, 2013 (edited) Ever wanted to get Month or Day names in national language?Or national currency information? Or all values for @OSLang?Then use _GetLocaleInfo UDF.expandcollapse popup; _GetLocaleInfo.au3 #include <array.au3> #include <ie.au3> #region Examples Local $log = "" $log &= _GLI_Day() & @TAB & @TAB & "current day in PC's default language" & @LF $log &= _GLI_Day("", 2) & @TAB & @TAB & "abbreviated current day in PC's default language" & @LF $log &= _GLI_Day(1) & @TAB & @TAB & "first day of week (sunday)" & @LF $log &= _GLI_Day(7) & @TAB & @TAB & "last day of week (saturday)" & @LF $log &= _GLI_Day("", "", "040c") & @TAB & @TAB & " current day in French" & @LF $log &= _GLI_Day("", "", "0411") & @TAB & @TAB & " current day in Japanese" & @LF $log &= _GLI_Day("", "", "0419") & @TAB & @TAB & " current day in Russian (Cyrillic)" & @LF $log &= _GLI_Day("7", "", "0809") & @TAB & @TAB & " last day in English" & @LF $log &= _GLI_Day("7", "2", "0809") & @TAB & @TAB & " abbreviated last day in English" & @LF $log &= "" & @LF $log &= _GLI_Month() & @TAB & @TAB & " current month in PC's default language" & @LF $log &= _GLI_Month("", 2) & @TAB & @TAB & " abbreviated current month in PC's default language" & @LF $log &= _GLI_Month(1) & @TAB & @TAB & " first month (January)" & @LF $log &= _GLI_Month(12) & @TAB & " last month (December)" & @LF $log &= _GLI_Month("", "", "040c") & @TAB & @TAB & " current month in French" & @LF $log &= _GLI_Month("", "", "0411") & @TAB & @TAB & " current month in Japanese" & @LF $log &= _GLI_Month("", "", "0419") & @TAB & @TAB & " current month in Russian (Cyrillic)" & @LF $log &= _GLI_Month("12", "", "0809") & @TAB & " last month in English" & @LF $log &= _GLI_Month("12", "2", "0809") & @TAB & @TAB & " abbreviated last month in English" & @LF MsgBox(262144, "_GLI_Day() and _GLI_Month() examples", $log) MsgBox(262144, " ", _GLI_Index()) ; show default country indexes MsgBox(262144, " ", _GLI_Index("040c")) ; show France indexes MsgBox(262144, " ", _GLI_CLIDs()) ; show all CLIDs Exit #endregion Examples #region udf _GetLocaleInfo.au3 ; #INDEX# ======================================================================================================================= ; Title .........: _GetLocaleInfo ; AutoIt Version : 3.3.8.1 or later ; Language ......: English ; Description ...: Functions to retrieve informations from locales ; Author(s) .....: Exit ; =============================================================================================================================== ; #CURRENT# ===================================================================================================================== ; _GLI_Day ; _GLI_Month ; _GLI_CLIDs ; _GLI_Index ; #INTERNAL_USE_ONLY# =========================================================================================================== ;__GLI_Get ; =============================================================================================================================== ; #FUNCTION# ==================================================================================================================== ; Name...........: _GLI_Day ; Description ...: Get the localized name of a weekday ; Syntax.........: _GLI_Day( [$i_Day = @WDAY [, $i_Abbrev = 1 [, $s_LCID = ""]]]) ; Parameters ....: $i_Day - Optional: specifies the day of week (1=sunday, 7=saturday) ; Default: current day of week (@wday) ; $i_Abbrev - Optional: specifies long or abbreviated format ; 1 = (Default) long format (Saturday) ; 2 = abbreviated format (Sat) ; $s_LCID - Optional: specifies the Locale ID in hex ; Default: Default language of the PC ; Return values .: On Success - Returns a string variable with the weekday name ; On Failure - Returns empty string and sets @ERROR ; @ERROR - 0 = No Error ; - 1 = Invalid $i_Day (not between 1 and 7) ; - 2 = Invalid $i_Abbrev (not 1 or 2) ; - 3 = Invalid $s_LCID ; Author ........: Exit ; =============================================================================================================================== Func _GLI_Day($i_Day = @WDAY, $i_Abbrev = 1, $s_LCID = "") ; validate $i_Day variable If $i_Day = Default Or $i_Day = "Default" Or $i_Day = "" Then $i_Day = @WDAY $i_Day += 0 If $i_Day < 1 Or $i_Day > 7 Then Return SetError(1, 0, "") ; validate $i_Abbrev variable If $i_Abbrev = Default Or $i_Abbrev = "Default" Or $i_Abbrev = "" Then $i_Abbrev = 1 $i_Abbrev += 0 If $i_Abbrev < 1 Or $i_Abbrev > 2 Then Return SetError(2, 0, "") ; validate $s_LCID variable ; If $s_LCID is not valid, @error = 3 ; for Locale IDs use function _GLI_CLIDs() ; or see http://msdn.microsoft.com/goglobal/bb964664 Local $NLS_definition_Index = Mod($i_Day + 5, 7) + 42 + ($i_Abbrev - 1) * 7 ; for $NLS_definition_Index use function _GLI_Index() ; or see here: ; http://www.trigeminal.com/code/CalendarStuff.bas ; ftp://ftp.biomed.cas.cz/pub/local/lucie/fabio/BC5/INCLUDE/WIN16/olenls.h Local $sReturn = __GLI_Get(Dec($s_LCID), $NLS_definition_Index) If $sReturn = "" Then Return SetError(3, 0, "") Return $sReturn EndFunc ;==>_GLI_Day ; #FUNCTION# ==================================================================================================================== ; Name...........: _GLI_Month ; Description ...: Get the localized name of a month ; Syntax.........: _GLI_Month( [$i_Month = @mon [, $i_Abbrev = 1 [, $s_LCID = ""]]]) ; Parameters ....: $i_Month - Optional: specifies the month (1=January, 12=December) ; Default: current month (@mon) ; $i_Abbrev - Optional: specifies long or abbreviated format ; 1 = (Default) long format (January) ; 2 = abbreviated format (Jan) ; $s_LCID - Optional: specifies the Locale ID in hex ; Default: Default language of the PC ; Return values .: On Success - Returns a string variable with the month name ; On Failure - Returns empty string and sets @ERROR ; @ERROR - 0 = No Error ; - 1 = Invalid $i_Month (not between 1 and 12) ; - 2 = Invalid $i_Abbrev (not 1 or 2) ; - 3 = Invalid $s_LCID ; Author ........: Exit ; =============================================================================================================================== Func _GLI_Month($i_Month = @MON, $i_Abbrev = 1, $s_LCID = "") ; validate $i_Month variable If $i_Month = Default Or $i_Month = "Default" Or $i_Month = "" Then $i_Month = @MON $i_Month += 0 If $i_Month < 1 Or $i_Month > 12 Then Return SetError(1, 0, "") ; validate $i_Abbrev variable If $i_Abbrev = Default Or $i_Abbrev = "Default" Or $i_Abbrev = "" Then $i_Abbrev = 1 $i_Abbrev += 0 If $i_Abbrev < 1 Or $i_Abbrev > 2 Then Return SetError(2, 0, "") ; validate $s_LCID variable ; If $s_LCID is not valid, @error = 3 Local $NLS_definition_Index = $i_Month + 55 + ($i_Abbrev - 1) * 12 Local $sReturn = __GLI_Get(Dec($s_LCID), $NLS_definition_Index) If $sReturn = "" Then Return SetError(3, 0, "") Return $sReturn EndFunc ;==>_GLI_Month ; #FUNCTION# ==================================================================================================================== ; Name...........: _GLI_CLIDs ; Description ...: Display all CLIDs in a browser window and opionally save HTML output ; Syntax.........: _GLI_CLIDs( [$iSaveHTML = 0]) ; Parameters ....: $i_SaveHTML - Optional: specifies if HTML output should be saved ; 0 = (Default) do not save HTML output ; 1 = save HTML output to file Default: @OSLang (default language of the PC) ; Return values .: On Success - Returns a string variable with the HTML output ; On Failure - Returns empty string ; Author ........: Exit ; =============================================================================================================================== #include <array.au3> #include <ie.au3> Func _GLI_CLIDs($iSaveHTML = 0) Local $s_LCID = "007f 0501 05fe 09ff" ; omit pseudo LCIDs Local $iLens_LCID = StringLen($s_LCID) + 1 ; count for stringtrimleft() Local $sTemp For $i = 0 To 0xffff $sTemp = __GLI_Get($i, 1) If StringInStr($s_LCID, $sTemp) Then ContinueLoop $s_LCID &= " " & $sTemp Next Local $aLCID = StringSplit(StringStripWS(StringTrimLeft($s_LCID, $iLens_LCID), 7), " ", 3) Local $aResult[UBound($aLCID)][6] Local $LCID For $i = 0 To UBound($aResult) - 1 $aResult[$i][0] = $aLCID[$i] $LCID = Dec($aResult[$i][0]) ; === short locale $aResult[$i][1] = __GLI_Get($LCID, 92) If $aResult[$i][1] = "" Then $aResult[$i][1] = __GLI_Get($LCID, 89) & "-" & __GLI_Get($LCID, 90) ; === language(country) in english $aResult[$i][2] = __GLI_Get($LCID, 114) If $aResult[$i][2] = "" Then $aResult[$i][2] = __GLI_Get($LCID, 4097) & "(" & __GLI_Get($LCID, 4098) & ")" ; === language(country) in your language $aResult[$i][3] = __GLI_Get($LCID, 2) ; === language(country) in local language $aResult[$i][4] = __GLI_Get($LCID, 115) If $aResult[$i][4] = "" Then $aResult[$i][4] = __GLI_Get($LCID, 4) & " (" & __GLI_Get($LCID, 8) & ")" ; === currency sign $aResult[$i][5] = __GLI_Get($LCID, 20) & " (" & __GLI_Get($LCID, 21) & ") " & __GLI_Get($LCID, 4103) & " (" & __GLI_Get($LCID, 4104) & ")" Next _ArraySort($aResult, 0, 0, 0, 2) Local $sHTML = "<H3>A total of " & UBound($aResult) & " LCIDs on a " & @OSVersion & " System sorted by english language </H3> " $sHTML &= @LF & '<TABLE border=1 cellSpacing=0 borderColor=#c0c0c0 cellPadding=3 width="100%"><TBODY><TR>' Local $sHTMLdef = @LF & '<TD style="BACKGROUND-COLOR: rgb(0,0,153); COLOR: white; FONT-WEIGHT: bold">' $sHTML &= $sHTMLdef & 'LCID (dec)' $sHTMLdef = '</TD>' & $sHTMLdef $sHTML &= $sHTMLdef & 'LCID (hex' $sHTML &= $sHTMLdef & 'Locale ' $sHTML &= $sHTMLdef & 'Language(Country) in english language' $sHTML &= $sHTMLdef & 'Language(Country) in your language' $sHTML &= $sHTMLdef & 'Language(Country) in local language' $sHTML &= $sHTMLdef & 'Currency' $sHTML &= '</TD></TR>' For $i = 0 To UBound($aResult) - 1 $sHTML &= @LF & "<TR><TD>" & Dec($aResult[$i][0]) & "</TD><TD>" & $aResult[$i][0] & "</TD><TD>" & $aResult[$i][1] & "</TD><TD>" & $aResult[$i][2] & "</TD><TD>" & $aResult[$i][3] & "</TD><TD>" & $aResult[$i][4] & "</TD><TD>" & $aResult[$i][5] & "</TD></TR>" Next $sHTML &= "</TBODY></TABLE>" $oIE = _IECreate() _IEBodyWriteHTML($oIE, $sHTML) If $iSaveHTML Then Local $sFilehandle = FileOpen(FileSaveDialog("Save HTML source ?", @ScriptDir, "HTML files (*.htm*)", 16, @ScriptFullPath & ".html"), 2 + 8 + 32) FileWrite($sFilehandle, $sHTML) FileClose($sFilehandle) EndIf Return $sHTML EndFunc ;==>_GLI_CLIDs ; #FUNCTION# ==================================================================================================================== ; Name...........: _GLI_Index ; Description ...: Display all index entries of a CLID in a browser window ; Syntax.........: _GLI_Index( [$s_LCID = ""]) ; Parameters ....: $s_LCID - Optional: specifies the Locale ID in hex ; Default: Default language of the PC ; Return values .: On Success - Returns a string variable with the HTML output ; On Failure - Returns empty string ; Author ........: Exit ; =============================================================================================================================== Func _GLI_Index($s_LCID = "") Local $s_LCIDdec = Dec($s_LCID) Local $sHTML = "" Local $sTemp For $i = 1 To 4200 $ih = Hex($i, 4) $sTemp = __GLI_Get($s_LCIDdec, $i) If $sTemp = "" Then ContinueLoop $sHTML &= $ih & " " & $i & " " & $sTemp & " <" & "br>" & @CR Next $oIE = _IECreate() _IEBodyWriteHTML($oIE, $sHTML) Return $sHTML EndFunc ;==>_GLI_Index ; #FUNCTION# ==================================================================================================================== ; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name...........: __GLI_Get ; Description ...: Get an index entrie of a LCID ; Syntax.........: __GLI_Get( $iLCID_Dec ,$iIndex) ; Parameters ....: $iLCID_Dec - specifies the Locale ID in decimal ; $iIndex - specifies the index of the LCID in decimal ; Return values .: On Success - Returns a string variable with the index data ; On Failure - Returns empty string ; Author ........: Exit ; =============================================================================================================================== Func __GLI_Get($iLCID_Dec, $iIndex) Local $aTemp = DllCall('kernel32.dll', 'int', 'GetLocaleInfoW', 'ulong', $iLCID_Dec, 'dword', $iIndex, 'wstr', '', 'int', 2048) Return $aTemp[3] EndFunc ;==>__GLI_Get #endregion udf _GetLocaleInfo.au3 Edited February 15, 2013 by Exit App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
guinness Posted February 8, 2013 Share Posted February 8, 2013 Thanks for sharing. By the way for anyone using WinAPIEx or the beta, _WinAPI_GetLocaleInfo is already available. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Myicq Posted February 10, 2013 Share Posted February 10, 2013 (edited) Very very interesting. I have searched for a way to use this function for a while, without resorting to databases with static information.a few suggestions: * expand the UDF to return other info such as currency, separators, name of other languages / countries etc etc. * allow users to specify locale in standard format, such as _LocalDay("", "", "fr-fr"); get current day in French / FranceYou wish to use these excellent resourceshttp://www.nedcomp.nl/support/origdocs/vbscript/extracted/html/vsmsclcid.aspx [chart of LCID vs standard locale names]http://www.flounder.com/localeexplorer.htm [explore everything related to locales, and then some...]Once again, thanks. Edited February 11, 2013 by Myicq I am just a hobby programmer, and nothing great to publish right now. Link to comment Share on other sites More sharing options...
Exit Posted February 10, 2013 Author Share Posted February 10, 2013 (edited) Here a script to show all LCIDs including currency signs:Edit: Script has been incorporated in UDF in post #1 Edited February 12, 2013 by Exit App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
Myicq Posted February 11, 2013 Share Posted February 11, 2013 @MyicqYour provided links seem to be broken.Fixed now, it was the brackets that confused editor. Thanks, also for your script.(although on my XP machine, all entries in 3rd column were blank.. are they always on XP ?) I am just a hobby programmer, and nothing great to publish right now. Link to comment Share on other sites More sharing options...
Exit Posted February 11, 2013 Author Share Posted February 11, 2013 (edited) * expand the UDF to return other info such as currency, separators, name of other languages / countries etc etc. See modified script in post #4 See modified UDF in post #1 * allow users to specify locale in standard format, such as _LocalDay("", "", "fr-fr"); get current day in French / France Would be a great overhead since those locale strings must be searched in all LCIDs. But the get_OSLang_CLIDs.au3 script in post #4 _GLI_CLIDs() function in post #1 may be used to find the correct LCID. (although on my XP machine, all entries in 3rd column were blank.. are they always on XP ?) Fixed. Edited February 12, 2013 by Exit App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
Myicq Posted February 12, 2013 Share Posted February 12, 2013 Real informative script, can't thank you enough.Odd that on WinXP, the Right-to-Left language descriptions are always missing a bracket, so that Arabic (Yemen) would appear as العربية (اليمن)Strange little bug, probably from Windows.Question: where do you get the numbers from for the index ? All MSDN documentation I can find do not list numeric values, only text constants ?I have found this list but not sure if it's for WIN_XP or Win_7, as it seems there are differences.(Yes, I did find the list in ApiConstants.au3, but it would be useful to know where such info is on MSDN offical documentation)Perhaps you can share some knowledge about that. Then your script provides an excellent step-stone for further investigation in the Windows Locale world.Thanks I am just a hobby programmer, and nothing great to publish right now. Link to comment Share on other sites More sharing options...
Exit Posted February 12, 2013 Author Share Posted February 12, 2013 Question: where do you get the numbers from for the index ? All MSDN documentation I can find do not list numeric values, only text constants ?I have found this list but not sure if it's for WIN_XP or Win_7, as it seems there are differences.(Yes, I did find the list in ApiConstants.au3, but it would be useful to know where such info is on MSDN offical documentation)I reorganised the UDF in post #1.I got the numbers by trial and error. The function _GLI_Index() of this UDF was a significant aid. App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
GreenCan Posted February 14, 2013 Share Posted February 14, 2013 (edited) I would recommend changing the default parameter used in your function _GLI_Index() from @OSLang to the System Locale. @OSLang is much too generic to return correct results. For example on my PC with English Windows 7, the function returns 0409 English (United States), with wrong date and number format, wrong currency code, etc. On My Dutch Windows 7, the function returns 0413 Nederlands (Nederland) which is again wrong as I live in Belgium The modified function returns 0813 Dutch (Belgium) and reflects the local settings of the system you are working on: Func _GLI_Index($s_LCID = "") If $s_LCID = "" Then Local $oService, $oItems, $OSLocale = '' $oService = ObjGet('winmgmts:\\.\root\cimv2') If Not IsObj($oService) Then Return '' EndIf $oItems = $oService.ExecQuery('SELECT Locale FROM Win32_OperatingSystem') If Not IsObj($oItems) Then Return '' EndIf For $Property In $oItems $OSLocale = $Property.Locale Next $s_LCID = $OSLocale EndIf Local $sTemp Local $s_LCIDdec = Dec($s_LCID) Local $sHTML = "" For $i = 1 To 4200 $ih = Hex($i, 4) $sTemp = __GLI_Get($s_LCIDdec, $i) If $sTemp = "" Then ContinueLoop ;ConsoleWrite($ih & " " & $i & " " & $sTemp & @CR) $sHTML &= $ih & " " & $i & " " & $sTemp & " <" & "br>" & @CR Next $oIE = _IECreate() _IEBodyWriteHTML($oIE, $sHTML) Return $sHTML EndFunc ;==>_GLI_Index Edited February 14, 2013 by GreenCan Contributions CheckUpdate - SelfUpdating script ------- Self updating script Dynamic input validation ------------------- Use a Input masks can make your life easier and Validation can be as simple MsgBox with CountDown ------------------- MsgBox with visual countdown Display Multiline text cells in ListView ---- Example of pop-up or ToolTip for multiline text items in ListView Presentation Manager ---------------------- Program to display and refresh different Border-less GUI's on a Display (large screen TV) USB Drive Tools ------------------------------ Tool to help you with your USB drive management Input Period udf ------------------------------ GUI for a period input Excel ColorPicker ---------------------------- Color pickup tool will allow you to select a color from the standard Excel color palette Excel Chart UDF ----------------------------- Collaboration project with water GetDateInString ------------------------------ Find date/time in a string using a date format notation like DD Mon YYYY hh:mm TaskListAllDetailed --------------------------- List All Scheduled Tasks Computer Info --------------------------------- A collection of information for helpdesk Shared memory Demo ----------------------- Demo: Two applications communicate with each other through means of a memory share (using Nomad function, 32bit only) Universal Date Format Conversion -------- Universal date converter from your PC local date format to any format Disable Windows DetailsPane -------------- Disable Windows Explorer Details Pane Oracle SQL Report Generator ------------- Oracle Report generator using SQL SQLite Report Generator ------------------- SQLite Report generator using SQL SQLite ListView and BLOB demo ---------- Demo: shows how binary (image) objects can be recognized natively in a database BLOB field DSN-Less Database connection demo --- Demo: ActiveX Data Objects DSN-Less Database access Animated animals ----------------------------- Fun: Moving animated objects Perforated image in GUI --------------------- Fun: Perforate your image with image objects UEZ's Perforator major update ------------- Fun: Pro version of Perforator by UEZ Visual Crop Tool (GUI) ----------------------- Easy to use Visual Image Crop tool Visual Image effect (GUI) -------------------- Visually apply effects on an image Link to comment Share on other sites More sharing options...
Exit Posted February 15, 2013 Author Share Posted February 15, 2013 @GreenCan Thanks for your efforts. @OSLang seems to be buggy. Please run this script to verify the issue. ConsoleWrite("@OSLang value is: "& @OSLang&@lf) ConsoleWrite("@OSLang: "&__GLI_Get(Dec(@OSLang),1)&" "&__GLI_Get(Dec(@OSLang),2)&@lf) ConsoleWrite("Default: "&__GLI_Get("",1)&" "&__GLI_Get("",2)&@lf) Func __GLI_Get($iLCID_Dec, $iIndex) Local $aTemp = DllCall('kernel32.dll', 'int', 'GetLocaleInfoW', 'ulong', $iLCID_Dec, 'dword', $iIndex, 'wstr', '', 'int', 2048) Return $aTemp[3] EndFunc ;==>__GLI_Get Please post the console output. Thanks Exit App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
GreenCan Posted February 15, 2013 Share Posted February 15, 2013 (edited) I don't think that @OSLang is buggy, it serves other purposes. My OS is indeed English, weather it is US or British, I leave in the middle... The results of your test are equivalent to the Win32_OperatingSystem query method, so that looks good test currently performed only on English OS and Belgium Dutch Locale. I will do the test on my other laptop tonight. @OSLang value is: 0409 @OSLang: 0409 English (United States) Default: 0813 Dutch (Belgium) Brgds, GreenCan Edited February 15, 2013 by GreenCan Contributions CheckUpdate - SelfUpdating script ------- Self updating script Dynamic input validation ------------------- Use a Input masks can make your life easier and Validation can be as simple MsgBox with CountDown ------------------- MsgBox with visual countdown Display Multiline text cells in ListView ---- Example of pop-up or ToolTip for multiline text items in ListView Presentation Manager ---------------------- Program to display and refresh different Border-less GUI's on a Display (large screen TV) USB Drive Tools ------------------------------ Tool to help you with your USB drive management Input Period udf ------------------------------ GUI for a period input Excel ColorPicker ---------------------------- Color pickup tool will allow you to select a color from the standard Excel color palette Excel Chart UDF ----------------------------- Collaboration project with water GetDateInString ------------------------------ Find date/time in a string using a date format notation like DD Mon YYYY hh:mm TaskListAllDetailed --------------------------- List All Scheduled Tasks Computer Info --------------------------------- A collection of information for helpdesk Shared memory Demo ----------------------- Demo: Two applications communicate with each other through means of a memory share (using Nomad function, 32bit only) Universal Date Format Conversion -------- Universal date converter from your PC local date format to any format Disable Windows DetailsPane -------------- Disable Windows Explorer Details Pane Oracle SQL Report Generator ------------- Oracle Report generator using SQL SQLite Report Generator ------------------- SQLite Report generator using SQL SQLite ListView and BLOB demo ---------- Demo: shows how binary (image) objects can be recognized natively in a database BLOB field DSN-Less Database connection demo --- Demo: ActiveX Data Objects DSN-Less Database access Animated animals ----------------------------- Fun: Moving animated objects Perforated image in GUI --------------------- Fun: Perforate your image with image objects UEZ's Perforator major update ------------- Fun: Pro version of Perforator by UEZ Visual Crop Tool (GUI) ----------------------- Easy to use Visual Image Crop tool Visual Image effect (GUI) -------------------- Visually apply effects on an image Link to comment Share on other sites More sharing options...
Exit Posted February 16, 2013 Author Share Posted February 16, 2013 Changed UDF in post #1 to set locale language as default instead of @OSLang App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now