Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

A batch files who scan the OS Language

178 views
Skip to first unread message

Celemka

unread,
Jun 3, 2003, 11:41:23 AM6/3/03
to
First excuse me for my English. It's for me a foreign language.

I see on your web site a lot of exemple of batch files, this is interesting
!!


But I have a problem


I will with a batch file detect the Language of the OS.


If I was on a Italian computer I will run Italy.exe and if I was on a French
computer I will run French.exe


How can I detect the Language of the OS ?

This batch file should work on win98/2000/XP

Thank you very much for your help.


Celemka


@echo off

Set Language

If Language = French goto FR

If Language = Italian goto IT

:FR French.exe

:IT Italy.exe

exit


foxidrive

unread,
Jun 3, 2003, 12:15:17 PM6/3/03
to
On Tue, 3 Jun 2003 17:41:23 +0200, Celemka wrote:


> How can I detect the Language of the OS ?
> This batch file should work on win98/2000/XP

I have not tested or evaluated this technique, but when you type

VER /?

on a system it should give some text in the native language and which you
can test for.

I'm assuming that all languages use the english VER for the version, but I
could have that wrong...

It would be up to you to fine tune the responses, I just guessed what they
might be based on the english word "displays"


@echo off
set language=
ver /?|find /i "Displays">nul
if not errorlevel 1 set language=english
ver /?|find /i "Affichages">nul
if not errorlevel 1 set language=french
ver /?|find /i "Esposizioni">nul
if not errorlevel 1 set language=italian

if not "%language%"=="" goto %language%
echo Unknown Language
goto end

:english
english.exe
goto end

:french
french.exe
goto end

:italian
italian.exe
goto end

:end

> Thank you very much for your help.

You're welcome. I'd appreciate knowing if it worked.

Celemka

unread,
Jun 3, 2003, 12:43:49 PM6/3/03
to
Thank youuuuuuuuuuuuuu for your answers


but if a put your code in a batch file and if I put this batch file in a
folder with frensh.exe italy.exe and english.exe it doesn't.
work


If a run this batch file, it's none exe file who were executing.
( I have a french version)

your code is probably good but I d'ont know if you make for correctly run
this patch
I have this web site found : http://www.robvanderwoude.com/index.html

but I not found my solutions

Could you just explain how you make to find the word Displays, Affichages,
Esposizioni

Thank you Thanh you

Celemka

"foxidrive" <foxi...@Shotmail.com> a écrit dans le message de news:
1p0garym7myuk$.1kgsxn5bdc0iv.dlg@40tude.net...

foxidrive

unread,
Jun 3, 2003, 1:03:49 PM6/3/03
to
On Tue, 3 Jun 2003 18:43:49 +0200, Celemka wrote:

>
> Could you just explain how you make to find the word Displays, Affichages,
> Esposizioni

Sorry, I am out of my depth here.

Open an MSDOS window and type this, then press enter:

ver /?

Then try it on an Italian and French computer.

Use a word on the screen from each language, where I wrote Affichages and
Esposizioni.

Celemka

unread,
Jun 4, 2003, 9:32:06 AM6/4/03
to
Thanh you for your answers.
But VER give noting.

i use that

@echo off

reg query "HKEY_CURRENT_USER\Control Panel\International" /v sCountry >
c:\vsr.vsr

set language=

find /i "France" c:\vsr.vsr > nul


if not errorlevel 1 set language=french

find /i "Belgium" c:\vsr.vsr > nul
if not errorlevel 1 set language=Belgium

find /i "Itaty" c:\vsr.vsr > nul
if not errorlevel 1 set language=Italy

if not "%language%"=="" goto %language%
echo Unknown Language
goto end

:French
MenuFR.bat

:Belgium
MenuBG.bat

:Italy
MenuIT.bat

REM DEFAULT
:end
MenuFR.bat

DEL c:\vsr.vsr


Thank you for your help, it was helpful

Celemka

"foxidrive" <foxi...@Shotmail.com> a écrit dans le message de news:

1tbw0iis9rx5g.1...@40tude.net...

Buddy

unread,
Jun 4, 2003, 7:52:16 PM6/4/03
to

"Celemka" <NOSPAM....@aol.com> wrote in message
news:3eddf4db$1$4631$626a...@news.free.fr...

> Thanh you for your answers.
> But VER give noting.
>
> i use that
>
> @echo off
>
> reg query "HKEY_CURRENT_USER\Control Panel\International" /v sCountry >

not sure as I amgoing to check, but is this key the input locale?? eg. my OS
is English and I use Chinese as my language.

<snip>>
<snip old>

I have trully Asian language OS and going to check. Very good point.

Thanks
Buddy


Ted Davis

unread,
Jun 4, 2003, 9:24:26 PM6/4/03
to

"HKEY_CURRENT_USER\Control Panel\International" /v sLanguage

There is quite a bit of possibly interesting stuff in
HKEY_CURRENT_USER\Control Panel\International\.

reg query "HKEY_CURRENT_USER\Control Panel\International\" /list

reg.exe is from the Resource Kit.


T.E.D. (tda...@gearbox.maem.umr.edu - e-mail must contain "T.E.D." or my .sig in the body)

Celemka

unread,
Jun 6, 2003, 5:36:55 AM6/6/03
to
hello Ted

Note that this is just valable with windows 2000/XP
On Windows 98, the flag of Language is not here

"HKEY_CURRENT_USER\Control Panel\International"

bye
Celemka


"Ted Davis" <tda...@gearbox.maem.umr.edu> a écrit dans le message de news:
8n6tdv4r0qt4cuvq4...@4ax.com...

Buddy

unread,
Jun 6, 2003, 7:45:37 AM6/6/03
to

"Celemka" <NOSPAM....@aol.com> wrote in message
news:3ee060b9$1$23963$626a...@news.free.fr...

> hello Ted
>
> Note that this is just valable with windows 2000/XP
> On Windows 98, the flag of Language is not here
>
> "HKEY_CURRENT_USER\Control Panel\International"
>
> bye
> Celemka
>
>
<snip old>

Hi Celemka,

yes, I am using windows 2000. The Software language is English. The result
of your regkey brings me Australia which is the place(locale) I chose (or I
am).
as said the locale not necessary tells what SOFTWARE language is been
installed. If you have a look on the locales you can have English,
Caribean/Canadian/Jamaica etc,
so the result of your regkey will return for example Belgium... hum ok, what
language do they speak there? (French!)
You will have too many possibilities.

I think the less variable possible still to use VER, which returns:
C:\>ver
Microsoft Windows 2000 [Version 5.00.2195]
C:\>

so, if you find "Version" could mean English
if you find "Versão" could mean Portuguese
"Versione" Italian ?? :)
and so on...
tell me what shows on yours?

Buddy


Celemka

unread,
Jun 6, 2003, 8:00:45 AM6/6/03
to

try
"HKEY_CURRENT_USER\Control Panel\International" and iCountry

"Buddy" <bu...@net.com> a écrit dans le message de news:
bbpv2b$9e4$1...@merki.connect.com.au...

Buddy

unread,
Jun 7, 2003, 3:18:18 AM6/7/03
to

"Celemka" <NOSPAM....@aol.com> wrote in message
news:3ee08274$1$24006$626a...@news.free.fr...

>
> try
> "HKEY_CURRENT_USER\Control Panel\International" and iCountry
>
>
>
>
<snip>
AHHH!! got something...
iCountry 61 (which is Australia or if you have setup correct the modem
dialup correct)
sCountry Australia (my locale is this, as metioned previously. I can take
my computer with me to Paraguay, BUT the software still English)

then..... tah tah!
sLanguage ENA (ENnglish Australia)
you don't need the rest of course. As long as you have EN it makes quicker
to verify the spoken language. BUT we are still not sure what OS version is
installed.

buddy


Todd Vargo

unread,
Jun 7, 2003, 7:56:28 AM6/7/03
to

"Buddy" <bu...@net.com> wrote in message
news:bbs3p4$29i$1...@merki.connect.com.au...

Since OP mentioned Win98 as one of the OS's, I suggest comparing registry
outputs between OS's too. For example, the iCountry and sLanguage values
mentioned along this thread do not exist on my Win98 system. The only item
under the International key above is "Locale" with a string value of
"00000409". Also, REG.EXE is not a feature of Win98 so it must be included
with the batch or use a feature common to each OS.

If this batch is intended to be portable, I would collect the "Locale" value
(assuming it is common to each OS) using a utility common to each OS, then
check it for the values relating to the nonEnglish values. If value is
neither, then default to English.

If all else fails, one could allow an option to prompt the user to choose a
*preferred* language.

--
Todd Vargo (body of message must contain my name to reply by email)

Celemka

unread,
Jun 11, 2003, 2:33:59 AM6/11/03
to
yes you have right...

My solution is to use MP3 Multimedia Builder, this is a software who make a
menu to choose the language.

bye
Celemka


"Todd Vargo" <todd...@nccw.net> a écrit dans le message de news:
bbsljl$crob1$1...@ID-25025.news.dfncis.de...

0 new messages