Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Retrieving the language selected


7 replies to this topic

jive02

jive02
  • Members
  • 40 posts

Posted 28 February 2002 - 14:03

Hi, I need to know in what langauge the installation is running. Could I then put this in the ragistry and use it so I don't have to ask the user again on uninstall?

Is there someone who knows?



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 28 February 2002 - 15:31

SELECTED_LANGUAGE system variable

jive02

jive02
  • Members
  • 40 posts

Posted 07 March 2002 - 16:20

When I use
Code Sample

GetSystemInfo(SELECTED_LANGUAGE,nResult,svResult)

I get a sad -1 in return..
- jonas

jive02

jive02
  • Members
  • 40 posts

Posted 11 March 2002 - 14:28

How do I access SELECTED_LANGUAGE?
GetSystemInfo doesn't seem to work..

Also, does someone know how to recieve the
system language from an MFC app?
- jonas

Ide Nentjes

Ide Nentjes
  • Members
  • 222 posts

Posted 11 March 2002 - 15:59

From IS 6.31 documentation:

The language that the setup uses to display prompts and messages is stored in the system variable SELECTED_LANGUAGE. Simply use this variable if you wish to know which langauage IS is running in.

Correct Call to GetSystemInfo:
Code Sample
GetSystemInfo(LANGUAGE,nvLanguage,svLanguage);

See GetSystemInfo documentation for more info

jive02

jive02
  • Members
  • 40 posts

Posted 12 March 2002 - 17:51

I feel really stupid now but it must be something here that I don't get. To retrieve SELECTED_LANGUAGE I should use

GetSystemInfo(LANGUAGE,nResult,sResult), is that right?

From this I get "English" probably because I got an English win2000-installation, even though my locale is "swedish".

GetSystemInfo(SELECTED_LANGUAGE,nResult,sResult)

Gives me nothing at all, it returns -1. The language I want is the one the user selected in the very beginning of the installation, not the locale, not the system language( even though I would be intrested of accessing the locale as well).

Please don't get upset over me asking so much about so little, guess I'm a bit slow or something but I'd be really happy if someone could help me out here :)
- jonas

Blake Miller Wonder

Blake Miller Wonder
  • Members
  • 121 posts

Posted 12 March 2002 - 19:07

The SELECTED_LANGUAGE is already set for you, and it is a variable in its own right.

Here is an example of InstallScript code we use to choose a specific language resource dll:

// choose resource dll based on install language
switch( SELECTED_LANGUAGE )
 case 0x0009: // english
   szDllPath = SUPPORTDIR ^ "WWSPHFR0009.DLL";
 case 0x0007: // german
   szDllPath = SUPPORTDIR ^ "WWSPHFR0007.DLL";
 case 0x0011: // japanese
   szDllPath = SUPPORTDIR ^ "WWSPHFR0011.DLL";
 case 0x040C: // french
   szDllPath = SUPPORTDIR ^ "WWSPHFR040C.DLL";
 default: // english
   szDllPath = SUPPORTDIR ^ "WWSPHFR0009.DLL";
endswitch;

jive02

jive02
  • Members
  • 40 posts

Posted 12 March 2002 - 20:21

You're the man!

Thanks a lot! :)
- jonas