Detect System Language Name: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
(Created page.) |
mNo edit summary |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{PageAuthor|deguix}} | |||
== Description == | == Description == | ||
'''Requires:''' [[System plug-in|System]] plug-in. | |||
'''Requires:''' [[System]] | |||
This function detects your system language name in system's language. | This function detects your system language name in system's language. | ||
== Function Call == | == Function Call == | ||
<highlight-nsis> | |||
Call SysLang | |||
Pop "$var1" ; Variable (for language name) | |||
</highlight-nsis> | |||
== Function Code == | == Function Code == | ||
<highlight-nsis> | |||
<highlight-nsis>;---------------------------------------------------------------------------- | ;---------------------------------------------------------------------------- | ||
; Title : Detect system language name | ; Title : Detect system language name | ||
; Short Name : SysLang | ; Short Name : SysLang | ||
Line 32: | Line 34: | ||
Function SysLang | Function SysLang | ||
Push $0 | Push $0 | ||
Line 43: | Line 44: | ||
Exch $0 | Exch $0 | ||
FunctionEnd</highlight-nsis> | |||
[[Category:System Related Functions]] |
Latest revision as of 07:47, 6 November 2005
Author: deguix (talk, contrib) |
Description
Requires: System plug-in.
This function detects your system language name in system's language.
Function Call
Call SysLang Pop "$var1" ; Variable (for language name)
Function Code
;---------------------------------------------------------------------------- ; Title : Detect system language name ; Short Name : SysLang ; Last Changed : 22/Feb/2005 ; Code Type : Function ; Code Sub-Type : One-way Output ;---------------------------------------------------------------------------- ; Required : System plugin. ; Description : Detects your system language name in system's language. ;---------------------------------------------------------------------------- ; Function Call : Call SysLang ; ; Pop "$Variable1" ; Language name. ;---------------------------------------------------------------------------- ; Author : Diego Pedroso ; Author Reg. Name : deguix ;---------------------------------------------------------------------------- Function SysLang Push $0 System::Alloc "${NSIS_MAX_STRLEN}" Pop $0 ;uses LOCALE_SYSTEM_DEFAULT and LOCALE_SLANGUAGE defines System::Call "Kernel32::GetLocaleInfo(i,i,t,i)i(2048,0x2,.r0,${NSIS_MAX_STRLEN})i" Exch $0 FunctionEnd