Old 12th May 2006, 11:49   #1
ipsoner
Junior Member
 
Join Date: May 2006
Posts: 4
Select Language

Hi folks,

I want to use the selection which I get from MUI_LANGUAGE and copy a file if selected language is e.g. German.
Could someone tell me, how I achieve it?

Here my code which is not functioning:

!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "English"

!if ${LANGUAGE} == "German"
CopyFiles "$INSTDIR\ipsone_de.qm" "$INSTDIR\ipsone_default.qm"
!endif

Hope someone can help me!

Greets
ipsoner is offline   Reply With Quote
Old 12th May 2006, 12:41   #2
glory_man
Senior Member
 
Join Date: Sep 2004
Location: Mogilev (Belarus)
Posts: 372
Try to use logiclib:

${if} ${LANGUAGE} == ${LANG_ENGLISH}
...action...
glory_man is offline   Reply With Quote
Old 12th May 2006, 13:23   #3
ipsoner
Junior Member
 
Join Date: May 2006
Posts: 4
Thanks.

but what do you mean with logiclib?

I have tried this, but it doesn't worked:
!if ${LANGUAGE} == ${LANG_GERMAN}
CopyFiles "$INSTDIR\ipsone_de.qm" "$INSTDIR\ipsone_default.qm"

Greets
ipsoner is offline   Reply With Quote
Old 12th May 2006, 14:15   #4
onad
Senior Member
 
onad's Avatar
 
Join Date: Dec 2004
Location: Turkey
Posts: 447
Lightbulb

TIP

Since nsis 2.16 there is no specific use for letting the user choose the language for the installer, since the installer takes the GUI language of the OS and takes the exact language for the installer, if not embeeted in the installer, takes the close match, otherwise the default language.

The philosphy:
If one can USE the OS one can sure read that language. there is much more to this, it is a complex subject. Plz read the Wiki for more info.

"Just do it"
onad is offline   Reply With Quote
Old 14th May 2006, 16:19   #5
ipsoner
Junior Member
 
Join Date: May 2006
Posts: 4
Hi!

Yes, I understand, but there are many users, which have a system in english and natively speak an other language...
Nevertheless I need an information what language the user applies. How do I get this language information?
My intention is to copy a certain file if a certain language is selected at installation. Just as I mentioned in the previous messages.

Greets
ipsoner is offline   Reply With Quote
Old 14th May 2006, 16:36   #6
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
the correct use with LogicLib is like this:

!include LogicLib.nsh

function CheckLang
${if} $LANGUAGE == ${LANG_GREEK}
messagebox mb_ok 'your choice is greek'
${ElseIf} $LANGUAGE == ${LANG_ENGLISH}
messagebox mb_ok 'your choice is english'
${EndIf}
functionend

you may also want to take a look at included example
${NSISDIR}\Examples\Languages.nsi

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 14th May 2006, 19:25   #7
ipsoner
Junior Member
 
Join Date: May 2006
Posts: 4
Thumbs up

Strike!
Thanks for your help! That's what I've been looking for.
Greets ipsoner
ipsoner is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

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