Results 1 to 9 of 9

Thread: InnoSetup Coding Language Detection

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2008
    Posts
    4

    InnoSetup Coding Language Detection

    Hello All,

    I have a probelm with the language detection on selcection of the language from the Language Dialog

    [Languages]
    Name: "en"; MessagesFile: "compilerefault.isl"
    Name: "ch"; MessagesFile: "Chinese.isl"


    I get Chinese and English in the combo of the language selecion Dialog Box.
    Now when I select English, My setup screens must use English text and When I select the Chinese Language it must use the Chinese Text.

    How do I detect this Language Selection and program Accordingly.

    Code:
    if {language} = "en" then
            MsgBox('English') 
    else
             MsgBox('Chinese') 
    end else
    end;
    Its not working... I dont know InnoSetup Coding. Could you please help me with the Language Detection Probelm.

    Regards,
    Hemanth

  2. #2
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: InnoSetup Coding Language Detection

    Please explain why you would need to detect the language

  3. #3
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: InnoSetup Coding Language Detection

    A quick search of the Inno Setup Help Documentation shows:

    ActiveLanguage

    Prototype:
    function ActiveLanguage: String;

    Description:
    Returns the name of the active language.

  4. #4

    Thread Starter
    New Member
    Join Date
    May 2008
    Posts
    4

    Re: InnoSetup Coding Language Detection

    Can You tell me its Usage. I have 2 languages in the combo Box, English and Chinese, When I select English, I want all my subsequent Dialogs to use that Language based on the selection.

  5. #5
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: InnoSetup Coding Language Detection

    Why not try

    Msgbox(ActiveLanguage)

  6. #6

    Thread Starter
    New Member
    Join Date
    May 2008
    Posts
    4

    Re: InnoSetup Coding Language Detection

    Quote Originally Posted by randem
    Why not try

    Msgbox(ActiveLanguage)
    No mate. You are getting me wrong. I just dont want to Show the Language to the User. Based on the Language I want to show different messages to the user.

    Now I need a way to check from the selection of the USer as to which language he has chosen. Based on the selection I need to show a chinese message or an english in the subsequent setup dialogs

  7. #7
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: InnoSetup Coding Language Detection

    Well, if you can show the language chosen, you obviously can check for it...

  8. #8

    Thread Starter
    New Member
    Join Date
    May 2008
    Posts
    4

    Re: InnoSetup Coding Language Detection

    Quote Originally Posted by randem
    Well, if you can show the language chosen, you obviously can check for it...
    Mate Please help me. I am using some other guy's Innosetup file. Just tweaking it a bit as it requires a change. I have no knowledge in it

  9. #9
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: InnoSetup Coding Language Detection

    randem is not doing all the work for you, but he is clearly helping you.

    You have shown that you already know enough to run that test - and based on what it shows you should be able to work out how to use it in your original attempt.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width