Win32OperatingSystem.st
changeset 10311 1cf7f6da9fad
parent 10297 d93eeb6c92eb
child 10334 6fe7d98b0c7b
equal deleted inserted replaced
10310:89d972739353 10311:1cf7f6da9fad
  6087      OperatingSystem getHostName
  6087      OperatingSystem getHostName
  6088     "
  6088     "
  6089 !
  6089 !
  6090 
  6090 
  6091 getLanguage
  6091 getLanguage
  6092     "return the domain this host is in.
  6092     "get the LANGUAGE setting (example: de_DE.iso8859-15@euro).
  6093      Notice:
  6093      An environment value has higher preceedence than the system language setting."
  6094 	not all systems support this; on some, 'unknown' is returned."
       
  6095 
  6094 
  6096     |lang|
  6095     |lang|
  6097 
  6096 
  6098     lang := self getEnvironment:'LANG'.
  6097     lang := self getEnvironment:'LANG'.
  6099     (lang isNil or:[lang = 'default']) ifTrue:[
  6098     (lang isNil or:[lang = 'default']) ifTrue:[
  6100 	"/ ok, search the registry ...
  6099         "/ ok, search the registry ...
  6101 	"/ under XP, it is found there ...
  6100         "/ under XP, it is found there ...
  6102 	lang := RegistryEntry
  6101         lang := RegistryEntry
  6103 		    stringValueFor:'sLanguage'
  6102                     stringValueFor:'sLanguage'
  6104 		    atKey:'HKEY_CURRENT_USER\Control Panel\International'.
  6103                     atKey:'HKEY_CURRENT_USER\Control Panel\International'.
  6105 	lang notNil ifTrue:[
  6104         lang notNil ifTrue:[
  6106 	    lang := self mapLanguage:lang.
  6105             lang := self mapLanguage:lang.
  6107 	].
  6106         ].
  6108     ].
  6107     ].
  6109     ^ lang
  6108     ^ lang
  6110 
  6109 
  6111     "
  6110     "
  6112      OperatingSystem getLanguage
  6111      OperatingSystem getLanguage
 12716 ! !
 12715 ! !
 12717 
 12716 
 12718 !Win32OperatingSystem class methodsFor:'documentation'!
 12717 !Win32OperatingSystem class methodsFor:'documentation'!
 12719 
 12718 
 12720 version
 12719 version
 12721     ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.257 2007-01-09 19:13:36 cg Exp $'
 12720     ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.258 2007-01-12 13:03:23 cg Exp $'
 12722 ! !
 12721 ! !
 12723 
 12722 
 12724 Win32OperatingSystem initialize!
 12723 Win32OperatingSystem initialize!
 12725 Win32OperatingSystem::RegistryEntry initialize!
 12724 Win32OperatingSystem::RegistryEntry initialize!