I have 50 computers in my network, and one common thing of all of them is
that one of the users is the same. I would like to read the regional
settings for this common user and save them into a file on the file server.
How can I do this ?

Re: Program to read the regional settings by Stefan

Stefan
Fri Apr 25 01:42:02 CDT 2008


"WP" <wp_nospam@fibertel.com.ar> schrieb im Newsbeitrag
news:eUUzqympIHA.1236@TK2MSFTNGP02.phx.gbl...
>I have 50 computers in my network, and one common thing of all of them is that one of the
>users is the same. I would like to read the regional settings for this common user and
>save them into a file on the file server. How can I do this ?

Are you asking from a FoxPro point-of-view, as opposed to a
Windows Active Directory profile, you probably mean Set('Date'),
Set('Currency') and so on?
If so, at runtime when your application starts, everything is set
to default - then, after you Set SysFormats On, everything is set
to the current Windows user's regional settings, so you can do
something like:
Insert Into yourTable (item, value) Values ( "Date", Set("Date"))
Insert Into yourTable (item, value) Values ( "Date1", Set("Date",1))
Insert Into yourTable (item, value) Values ( "Mark", Set("Mark"))
Insert Into yourTable (item, value) Values ( "Currency", Set("Currency"))
Insert Into yourTable (item, value) Values ( "Currency1", Set("Currency",1))
Insert Into yourTable (item, value) Values ( "Point", Set("Point"))
Insert Into yourTable (item, value) Values ( "Separator", Set("Separator"))

and so on.
Why do you want to do that?


hth
-Stefan




--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------



Re: Program to read the regional settings by Willianto

Willianto
Fri Apr 25 03:49:58 CDT 2008

WP:

I use the following API to get regional settings,
<start_vfp_code>
*!* List All Supported Languages and Their ID's
*!* Arabic (Saudi Arabia) 1025
*!* Arabic (Iraq) 2049
*!* Arabic (Egypt) 3073
*!* Arabic (Libya) 4097
*!* Arabic (Algeria) 5121
*!* Arabic (Morocco) 6145
*!* Arabic (Tunisia) 7169
*!* Arabic (Oman) 8193
*!* Arabic (Yemen) 9217
*!* Arabic (Syria) 10241
*!* Arabic (Jordan) 11265
*!* Arabic (Lebanon) 12289
*!* Arabic (Kuwait) 13313
*!* Arabic (U.A.E.) 14337
*!* Arabic (Bahrain) 15361
*!* Arabic (Qatar) 16385
*!* Bulgarian 1026
*!* Catalan 1027
*!* Chinese (Taiwan) 1028
*!* Chinese (PRC) 2052
*!* Chinese (Hong Kong SAR 3076
*!* Chinese (Singapore) 4100
*!* Czech 1029
*!* Danish 1030
*!* German (Standard) 1031
*!* German (Swiss) 2055
*!* German (Austrian) 3079
*!* German (Luxembourg) 4103
*!* German (Liechtenstein) 5127
*!* Greek 1032
*!* English (United States) 1033
*!* English (United Kingdom) 2057
*!* English (Australian) 3081
*!* English (Canadian) 4105
*!* English (New Zealand) 5129
*!* English (Ireland) 6153
*!* English (South Africa) 7177
*!* English (Jamaica) 8201
*!* English (Caribbean) 9225
*!* English (Belize) 10249
*!* English (Trinidad) 11273
*!* Spanish (Traditional Sort) 1034
*!* Spanish (Mexican) 2058
*!* Spanish (Modern Sort) 3082
*!* Spanish (Guatemala) 4106
*!* Spanish (Costa Rica) 5130
*!* Spanish (Panama) 6154
*!* Spanish (Dominican Republic) 7178
*!* Spanish (Venezuela) 8202
*!* Spanish (Colombia) 9226
*!* Spanish (Peru) 10250
*!* Spanish (Argentina) 11274
*!* Spanish (Ecuador) 12298
*!* Spanish (Chile) 13322
*!* Spanish (Uruguay) 14346
*!* Spanish (Paraguay) 15370
*!* Spanish (Bolivia) 16394
*!* Spanish (El Salvador) 17418
*!* Spanish (Honduras) 18442
*!* Spanish (Nicaragua) 19466
*!* Spanish (Puerto Rico) 20490
*!* Finnish 1035
*!* French (Standard) 1036
*!* French (Belgian) 2060
*!* French (Canadian) 3084
*!* French (Swiss) 4108
*!* French (Luxembourg) 5132
*!* Hebrew 1037
*!* Hungarian 1038
*!* Icelandic 1039
*!* Italian (Standard) 1040
*!* Italian (Swiss) 2064
*!* Japanese 1041
*!* Korean 1042
*!* Korean (Johab) 2066
*!* Dutch (Standard) 1043
*!* Dutch (Belgian) 2067
*!* Norwegian (Bokmal) 1044
*!* Norwegian (Nynorsk) 2068
*!* Polish 1045
*!* Portuguese (Brazil) 1046
*!* Portuguese (Portugal) 2070
*!* Romanian 1048
*!* Russian 1049
*!* Croatian 1050
*!* Serbian (Latin) 2074
*!* Serbian (Cyrillic) 3098
*!* Slovak 1051
*!* Albanian 1052
*!* Swedish 1053
*!* Swedish (Finland) 2077
*!* Thai 1054
*!* Turkish 1055
*!* Indonesian 1057
*!* Ukrainian 1058
*!* Belarusian 1059
*!* Slovenian 1060
*!* Estonian 1061
*!* Latvian 1062
*!* Lithuanian 1063
*!* Farsi 1065
*!* Vietnamese 1066
*!* Basque 1069
*!* Afrikaans 1078
*!* Faeroese 1080
*!* Declare GetUserDefaultLCID API Function
DECLARE LONG GetUserDefaultLCID IN WIN32API
*!* Get Language ID *****
liUserDefaultLCID = GetUserDefaultLCID()

do case
case liUserDefaultLCID = ....
...
...

endcase

<end_vfp_code>

hth,
Willianto



Re: Program to read the regional settings by WP

WP
Fri Apr 25 09:29:24 CDT 2008

Thanks Stefan,

what I like to do is to set at the start of my application the Windows
regional settings to "Spanish (Peru)", and at the end of the application to
set them back to the settings it originally had.

Walter



"Stefan Wuebbe" <stefan.wuebbe@gmx.de> escribió en el mensaje
news:OP5h99ppIHA.2188@TK2MSFTNGP04.phx.gbl...
>
> "WP" <wp_nospam@fibertel.com.ar> schrieb im Newsbeitrag
> news:eUUzqympIHA.1236@TK2MSFTNGP02.phx.gbl...
>>I have 50 computers in my network, and one common thing of all of them is
>>that one of the users is the same. I would like to read the regional
>>settings for this common user and save them into a file on the file
>>server. How can I do this ?
>
> Are you asking from a FoxPro point-of-view, as opposed to a
> Windows Active Directory profile, you probably mean Set('Date'),
> Set('Currency') and so on?
> If so, at runtime when your application starts, everything is set
> to default - then, after you Set SysFormats On, everything is set
> to the current Windows user's regional settings, so you can do
> something like:
> Insert Into yourTable (item, value) Values ( "Date", Set("Date"))
> Insert Into yourTable (item, value) Values ( "Date1", Set("Date",1))
> Insert Into yourTable (item, value) Values ( "Mark", Set("Mark"))
> Insert Into yourTable (item, value) Values ( "Currency",
> Set("Currency"))
> Insert Into yourTable (item, value) Values ( "Currency1",
> Set("Currency",1))
> Insert Into yourTable (item, value) Values ( "Point", Set("Point"))
> Insert Into yourTable (item, value) Values ( "Separator",
> Set("Separator"))
>
> and so on.
> Why do you want to do that?
>
>
> hth
> -Stefan
>
>
>
>
> --
> |\_/| ------ ProLib - programmers liberty -----------------
> (.. ) Our MVPs and MCPs make the Fox run....
> - / See us at www.prolib.de or www.AFPages.de
> -----------------------------------------------------------
>



Re: Program to read the regional settings by Stefan

Stefan
Fri Apr 25 12:48:08 CDT 2008


"WP" <wp_nospam@fibertel.com.ar> wrote in message
news:%23kUsEDupIHA.3428@TK2MSFTNGP02.phx.gbl...
> Thanks Stefan,
>
> what I like to do is to set at the start of my application the Windows regional settings
> to "Spanish (Peru)", and at the end of the application to set them back to the settings
> it originally had.
Hi Walter,

I believe that can be done via "SetLocaleInfo" API but would
recommend against it (because you'd change that setting for the
entire O/S for all applications).
Changing only those settings you need locally inside you
application is not an option?



Saludos
-Stefan



--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------