ven. 30 juillet 2010, 14h56
Gregory Adam
atoutfox.public.association
Re: 'locale language'
Thierry,
Essaye ceci - tout se trouve dans la base de registre
#include "Foxpro.h"
#define false .f.
#define true .t.
*_______________________________________________________________________________
function test()
local s
local langId
langId = 1033 && 1036
if( GetLangStringFromLangId(@m.s, m.langId) )
? m.langId, m.s
else
? m.langId, 'Fail'
endif
endfunc
*_______________________________________________________________________________
*_______________________________________________________________________________
function GetLangStringFromLangId(s, langId)
local success
success = true
local shellObj, sKey
do case
case !m.success
otherwise
try
sKey = right(transf(m.langId, '@0'), 4)
shellObj = CreateObject("WScript.Shell")
s = m.shellObj.RegRead("HKLM\SOFTWARE\Classes\MIME\Database\Rfc1766\" +
m.sKey)
s= left(m.s, at(';', m.s)-1)
if( empty(at('-', m.s)) )
s = m.s + '-' + m.s
endif
catch
assert false
success = false
endtry
endcase
return m.success
endfunc
*_______________________________________________________________________________
--
Gregory
_
"Thierry N" <none@zenbuyer.com> wrote in message
news:i2ubdv$1u0r$1@news.niouzes.net...
Permalink : http://www.atoutfox.org/nntp.asp?ID=0000003742