<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://nsis.sourceforge.io/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Adding_Keyboard_Layouts_for_other_languages</id>
	<title>Adding Keyboard Layouts for other languages - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://nsis.sourceforge.io/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Adding_Keyboard_Layouts_for_other_languages"/>
	<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Adding_Keyboard_Layouts_for_other_languages&amp;action=history"/>
	<updated>2026-08-28T04:34:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Adding_Keyboard_Layouts_for_other_languages&amp;diff=10658&amp;oldid=prev</id>
		<title>CancerFace at 10:50, 8 June 2006</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Adding_Keyboard_Layouts_for_other_languages&amp;diff=10658&amp;oldid=prev"/>
		<updated>2006-06-08T10:50:25Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;â† Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:50, 8 June 2006&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l64&quot;&gt;Line 64:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 64:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   failed-${Index}:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   failed-${Index}:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    System::Call &amp;#039;user32::ActivateKeyboardLayout(i 1, i 8)i.r0&amp;#039; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; ; activates the next available&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    System::Call &amp;#039;user32::ActivateKeyboardLayout(i 1, i 8)i.r0&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    System::Call &amp;#039;user32::UnloadKeyboardLayout(i ${LangID})i.r0&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    System::Call &amp;#039;user32::UnloadKeyboardLayout(i ${LangID})i.r0&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key n22049_wiki-wiki_:diff::1.12:old-10657:rev-10658 --&gt;
&lt;/table&gt;</summary>
		<author><name>CancerFace</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Adding_Keyboard_Layouts_for_other_languages&amp;diff=10657&amp;oldid=prev</id>
		<title>CancerFace at 10:41, 8 June 2006</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Adding_Keyboard_Layouts_for_other_languages&amp;diff=10657&amp;oldid=prev"/>
		<updated>2006-06-08T10:41:05Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;â† Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:41, 8 June 2006&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l61&quot;&gt;Line 61:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 61:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;!define Index &amp;quot;Line${__LINE__}&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;!define Index &amp;quot;Line${__LINE__}&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   System::Call &amp;#039;user32::UnloadKeyboardLayout(i ${LangID})i.r0&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   System::Call &amp;#039;user32::UnloadKeyboardLayout(i ${LangID})i.r0&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;StrCpy &lt;/del&gt;$0 0 failed-${Index} end-${Index}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;StrCmp &lt;/ins&gt;$0 0 failed-${Index} end-${Index}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   failed-${Index}:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   failed-${Index}:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key n22049_wiki-wiki_:diff::1.12:old-10656:rev-10657 --&gt;
&lt;/table&gt;</summary>
		<author><name>CancerFace</name></author>
	</entry>
	<entry>
		<id>https://nsis.sourceforge.io/mediawiki/index.php?title=Adding_Keyboard_Layouts_for_other_languages&amp;diff=10656&amp;oldid=prev</id>
		<title>CancerFace at 10:40, 8 June 2006</title>
		<link rel="alternate" type="text/html" href="https://nsis.sourceforge.io/mediawiki/index.php?title=Adding_Keyboard_Layouts_for_other_languages&amp;diff=10656&amp;oldid=prev"/>
		<updated>2006-06-08T10:40:14Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{PageAuthor|CancerFace}}&lt;br /&gt;
NSIS forum [http://forums.winamp.com/showthread.php?s=&amp;amp;postid=1952299 thread] started by user [http://forums.winamp.com/member.php?s=&amp;amp;action=getinfo&amp;amp;userid=202236 huq.duote.com]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
These macros will allow you to add a keyboard layout and activate it for the current thread on the fly, or to unload an already loaded keyboard layout.&lt;br /&gt;
The second macro will try to unload a keyboard layout and if it fails it will try to activate the next available layout first.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
Call the macro passing the language ID that you want to load.&lt;br /&gt;
For a list of Language IDs check [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_238z.asp this] MSDN page (Identifier list).&lt;br /&gt;
&lt;br /&gt;
To load a keyboard layout use:&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;&lt;br /&gt;
!insertmacro LoadLangLayout &amp;lt;your_layout_ID&amp;gt;&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
To unload a keyboard layout use:&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;&lt;br /&gt;
!insertmacro UnloadLangLayout &amp;lt;your_layout_ID&amp;gt;&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example to load the French keyboard layout use:&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;&lt;br /&gt;
!insertmacro LoadLangLayout 0x040c&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Macros ==&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;&lt;br /&gt;
!macro LoadLangLayout LangID&lt;br /&gt;
!define Index &amp;quot;Line${__LINE__}&amp;quot;&lt;br /&gt;
  StrCpy $8 &amp;quot;${LangID}&amp;quot; &amp;quot;&amp;quot; 2&lt;br /&gt;
  StrCpy $8 &amp;quot;0000$8&amp;quot;&lt;br /&gt;
  System::Alloc ${NSIS_MAX_STRLEN}&lt;br /&gt;
  Pop $R0&lt;br /&gt;
  System::Call &amp;#039;user32::GetKeyboardLayoutList(i ${NSIS_MAX_STRLEN}, i R0)i.r0&amp;#039;&lt;br /&gt;
  StrCpy $9 1&lt;br /&gt;
&lt;br /&gt;
  loop-${Index}:&lt;br /&gt;
    System::Call &amp;#039;*$R0(i .r1)&amp;#039;&lt;br /&gt;
      IntFmt $2 &amp;quot;%08x&amp;quot; $1&lt;br /&gt;
      StrCpy $3 $2 &amp;quot;&amp;quot; -4&lt;br /&gt;
      StrCpy $4 &amp;quot;0x$3&amp;quot;&lt;br /&gt;
      IntOp $R0 $R0 + 4&lt;br /&gt;
    StrCmp $4 ${LangID} macro_end_${Index}&lt;br /&gt;
    StrCmp $9 $0 loop_end-${Index}&lt;br /&gt;
    IntOp $9 $9 + 1&lt;br /&gt;
    Goto loop-${Index}&lt;br /&gt;
    &lt;br /&gt;
  loop_end-${Index}:&lt;br /&gt;
    System::Call &amp;#039;user32::LoadKeyboardLayoutA(t r8, i 1)i.r0&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  macro_end_${Index}:&lt;br /&gt;
    System::Call &amp;#039;user32::ActivateKeyboardLayout(i ${LangID}, i 8)i.r0&amp;#039;&lt;br /&gt;
!undef Index&lt;br /&gt;
!macroend&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;highlight-nsis&amp;gt;&lt;br /&gt;
!macro UnloadLangLayout LangID&lt;br /&gt;
!define Index &amp;quot;Line${__LINE__}&amp;quot;&lt;br /&gt;
  System::Call &amp;#039;user32::UnloadKeyboardLayout(i ${LangID})i.r0&amp;#039;&lt;br /&gt;
  StrCpy $0 0 failed-${Index} end-${Index}&lt;br /&gt;
&lt;br /&gt;
  failed-${Index}:&lt;br /&gt;
   System::Call &amp;#039;user32::ActivateKeyboardLayout(i 1, i 8)i.r0&amp;#039;  ; activates the next available&lt;br /&gt;
   System::Call &amp;#039;user32::UnloadKeyboardLayout(i ${LangID})i.r0&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  end-${Index}:&lt;br /&gt;
!undef Index&lt;br /&gt;
!macroend&lt;br /&gt;
&amp;lt;/highlight-nsis&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Resources and Links ==&lt;br /&gt;
* NSIS forum [http://forums.winamp.com/showthread.php?s=&amp;amp;postid=1952299 thread] started by user [http://forums.winamp.com/member.php?s=&amp;amp;action=getinfo&amp;amp;userid=202236 huq.duote.com]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
API Functions used:&lt;br /&gt;
* [http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/getkeyboardlayoutlist.asp GetKeyboardLayoutList]&lt;br /&gt;
* [http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/loadkeyboardlayout.asp LoadKeyboardLayout]&lt;br /&gt;
* [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/activatekeyboardlayout.asp ActivateKeyboardLayout]&lt;br /&gt;
* [http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/unloadkeyboardlayout.asp UnloadKeyboardLayout]&lt;/div&gt;</summary>
		<author><name>CancerFace</name></author>
	</entry>
</feed>