Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 9th September 2010, 09:08   #1
air_circle
Junior Member
 
Join Date: Sep 2010
Posts: 9
Smile Who know how to get the current pc language setting by NSIS script?

Dear all,

Any expert on NSIS script?

I am doing an installation package by NSIS,But Now I fall across a problem.
I want to make the installation package display the language matched with my pc "setting ->control panel->Regional and language options->regional options" language settings.
Now ,I don't know how to get the pc "setting ->control panel->Regional and language options->regional options" language settings by NSIS,Anyone know it ,Any methods ?
If I can get my loacal language settings,then I can $LANGUAGE to be the local language.

I am anxious about your help.


Thanks&Regards,
Janice
air_circle is offline   Reply With Quote
Old 9th September 2010, 09:13   #2
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
http://forums.winamp.com/showthread.php?t=252680 - GetSystemDefaultLangID

From some further googling..
http://www.google.com/search?q=site%...rDefaultLangID
..it seems that it should already be using the user's language?
http://forums.winamp.com/archive/ind.../t-259017.html
Animaether is offline   Reply With Quote
Old 9th September 2010, 14:19   #3
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Long ago NSIS used the regional settings to determine default installer language. Now it uses the host OS UI language instead.

air_circle, please don't set your installer to the regional language. PLEASE. It is a common occurrence to have your Windows set to a locale you don't really want to use. Example: My PCs are all in Japanese locale because the translation projects I work on (often) require it. But that doesn't mean I can read Japanese myself. I do NOT want installers to suddenly switch to Japanese, just because my locale happens to be set to Japanese.

The way NSIS behaves is the proper way. If you must set the default to the locale language, please at least show a selection screen before you start the installer.
MSG is offline   Reply With Quote
Old 13th September 2010, 09:17   #4
air_circle
Junior Member
 
Join Date: Sep 2010
Posts: 9
Dear Animaether&MSG,

Thanks for your info ,Now I want to NSIS installation package only display English whatever the OS is which language,How can I do it? Can anyone know the implement of macro "MUI_LANGUAGE" ,because I find some code example have following setting,can anyone explain what is done if execute following code.And which langugage is setted?
# Installer languages
!insertmacro MUI_LANGUAGE "English" ;
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Spanish"

Thanks&Regards,
Janice
air_circle is offline   Reply With Quote
Old 13th September 2010, 10:09   #5
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
To make an English-only installer, simply remove all language macros except English.
MSG is offline   Reply With Quote
Old 17th September 2010, 05:25   #6
air_circle
Junior Member
 
Join Date: Sep 2010
Posts: 9
Dear MSG,

I remember you said that NSIS uses the host OS UI language to determine default installer language,If my os is chinese,only keep english micro there ok? But NSIS installater shall not display chinese first according to my os language chinese.I am confused ,can you explain the truth to me?

As I understand,I think I shall set $LANGUAGE is english as follwoing code here.Why you don't refer this,is this not needed? Whether I have misunderstand?
Function .onInit
#!insertmacro MUI_LANGDLL_DISPLAY
StrCpy $LANGUAGE ${LANG_ENGLISH}
FunctionEnd

Thanks.
air_circle is offline   Reply With Quote
Old 24th September 2010, 18:55   #7
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
If you only include the English macro, then you're not adding Chinese as an installer language, and naturally your installer will not show in Chinese in that case.

As for your second question, I never use languages in NSIS, all my installers are only in English. So I have no idea. I'm sure it's in the (MUI2) documentation somewhere.
MSG is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
installation, multi language, nsis

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump