Detect System Language Name: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
m (FF: use <highlight-nsis> instead of a list. Added "Page author" line.) |
m (Updated author links.) |
||
Line 1: | Line 1: | ||
{|align=right | |||
|<small>Author: [[{{ns:2}}:Anonymous|Anonymous]] ([[{{ns:3}}:Anonymous|talk]], [[{{ns:-1}}:Contributions/Anonymous|contrib]])</small> | |||
|} | |||
<br style="clear:both;"> | |||
== Description == | == Description == | ||
'''Requires:''' [[System]] plugin. | '''Requires:''' [[System]] plugin. | ||
Line 42: | Line 46: | ||
System::Call "Kernel32::GetLocaleInfo(i,i,t,i)i(2048,0x2,.r0,${NSIS_MAX_STRLEN})i" | System::Call "Kernel32::GetLocaleInfo(i,i,t,i)i(2048,0x2,.r0,${NSIS_MAX_STRLEN})i" | ||
Exch $0 | Exch $0</highlight-nsis> | ||
</highlight-nsis> |
Revision as of 23:28, 29 April 2005
Author: Anonymous (talk, contrib) |
Description
Requires: System plugin.
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