all groups > dotnet internationalization > december 2004 >
I have an issue where a .NET application is not seeing the correct culture of a server as defined within the "Regional Options" settings of Control Panel. I've gone through and set all of the options to German, but when my app executes it reports the CurrentCulture (of the active thread) as English. What am I missing? The server is a Win2k Terminal O/S. Thanks Eric P.S. I know I can manually set the culture for the thread in code, but it
The one you see in Regional Options on a server is not necessarily the one that an application would see -- if that account is running under another user account and/or the profile is not loaded, the settings would not apply. Can you give some more info about the application, the context in which it is running, etc.? -- MichKa [MS] NLS Collation/Locale/Keyboard Technical Lead Globalization Infrastructure, Fonts, and Tools Microsoft Windows International Division This posting is provided "AS IS" with no warranties, and confers no rights. [quoted text, click to view] "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote in message news:369134BE-A1A6-411D-B454-659E154A58FD@microsoft.com... > I have an issue where a .NET application is not seeing the correct culture of > a server as defined within the "Regional Options" settings of Control Panel. > I've gone through and set all of the options to German, but when my app > executes it reports the CurrentCulture (of the active thread) as English. > What am I missing? The server is a Win2k Terminal O/S. > > Thanks > Eric > > P.S. I know I can manually set the culture for the thread in code, but it > seems to me that I shouldn't have too.
It's a service running under the System account. When the service first starts I check the culture of the current thread and no matter what's set in Control Panel it always reports English. [quoted text, click to view] "Michael (michka) Kaplan [MS]" wrote: > The one you see in Regional Options on a server is not necessarily the one > that an application would see -- if that account is running under another > user account and/or the profile is not loaded, the settings would not apply. > > Can you give some more info about the application, the context in which it > is running, etc.? > > > -- > MichKa [MS] > NLS Collation/Locale/Keyboard Technical Lead > Globalization Infrastructure, Fonts, and Tools > Microsoft Windows International Division > > This posting is provided "AS IS" with > no warranties, and confers no rights. > > > "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote in message > news:369134BE-A1A6-411D-B454-659E154A58FD@microsoft.com... > > I have an issue where a .NET application is not seeing the correct culture > of > > a server as defined within the "Regional Options" settings of Control > Panel. > > I've gone through and set all of the options to German, but when my app > > executes it reports the CurrentCulture (of the active thread) as English. > > What am I missing? The server is a Win2k Terminal O/S. > > > > Thanks > > Eric > > > > P.S. I know I can manually set the culture for the thread in code, but it > > seems to me that I shouldn't have too. > >
That is entirely expected. When you look at Regional Options you are not logged in under the system account; you are logged in as you. Therefore, what you set there has no impact on what the system account settings are. -- MichKa [MS] NLS Collation/Locale/Keyboard Technical Lead Globalization Infrastructure, Fonts, and Tools Microsoft Windows International Division This posting is provided "AS IS" with no warranties, and confers no rights. [quoted text, click to view] "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote in message news:D749CD8A-2F7B-46CA-878C-88E5B2E06A3F@microsoft.com... > It's a service running under the System account. When the service first > starts I check the culture of the current thread and no matter what's set in > Control Panel it always reports English. > > "Michael (michka) Kaplan [MS]" wrote: > > > The one you see in Regional Options on a server is not necessarily the one > > that an application would see -- if that account is running under another > > user account and/or the profile is not loaded, the settings would not apply. > > > > Can you give some more info about the application, the context in which it > > is running, etc.? > > > > > > -- > > MichKa [MS] > > NLS Collation/Locale/Keyboard Technical Lead > > Globalization Infrastructure, Fonts, and Tools > > Microsoft Windows International Division > > > > This posting is provided "AS IS" with > > no warranties, and confers no rights. > > > > > > "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote in message > > news:369134BE-A1A6-411D-B454-659E154A58FD@microsoft.com... > > > I have an issue where a .NET application is not seeing the correct culture > > of > > > a server as defined within the "Regional Options" settings of Control > > Panel. > > > I've gone through and set all of the options to German, but when my app > > > executes it reports the CurrentCulture (of the active thread) as English. > > > What am I missing? The server is a Win2k Terminal O/S. > > > > > > Thanks > > > Eric > > > > > > P.S. I know I can manually set the culture for the thread in code, but it > > > seems to me that I shouldn't have too. > > > > > >
Ok, so that begs the question "How do you set the regional settings for the System account?" When I made the changes, I was logged in as Administrator. [quoted text, click to view] "Michael (michka) Kaplan [MS]" wrote: > That is entirely expected. When you look at Regional Options you are not > logged in under the system account; you are logged in as you. Therefore, > what you set there has no impact on what the system account settings are. > > > -- > MichKa [MS] > NLS Collation/Locale/Keyboard Technical Lead > Globalization Infrastructure, Fonts, and Tools > Microsoft Windows International Division > > This posting is provided "AS IS" with > no warranties, and confers no rights. > > > > "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote in message > news:D749CD8A-2F7B-46CA-878C-88E5B2E06A3F@microsoft.com... > > It's a service running under the System account. When the service first > > starts I check the culture of the current thread and no matter what's set > in > > Control Panel it always reports English. > > > > "Michael (michka) Kaplan [MS]" wrote: > > > > > The one you see in Regional Options on a server is not necessarily the > one > > > that an application would see -- if that account is running under > another > > > user account and/or the profile is not loaded, the settings would not > apply. > > > > > > Can you give some more info about the application, the context in which > it > > > is running, etc.? > > > > > > > > > -- > > > MichKa [MS] > > > NLS Collation/Locale/Keyboard Technical Lead > > > Globalization Infrastructure, Fonts, and Tools > > > Microsoft Windows International Division > > > > > > This posting is provided "AS IS" with > > > no warranties, and confers no rights. > > > > > > > > > "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote in > message > > > news:369134BE-A1A6-411D-B454-659E154A58FD@microsoft.com... > > > > I have an issue where a .NET application is not seeing the correct > culture > > > of > > > > a server as defined within the "Regional Options" settings of Control > > > Panel. > > > > I've gone through and set all of the options to German, but when my > app > > > > executes it reports the CurrentCulture (of the active thread) as > English. > > > > What am I missing? The server is a Win2k Terminal O/S. > > > > > > > > Thanks > > > > Eric > > > > > > > > P.S. I know I can manually set the culture for the thread in code, but > it > > > > seems to me that I shouldn't have too. > > > > > > > > > > >
The user named "Administrator" is not the system account (you can run a service as "Administrator" so clearly they are different things). There is no UI method to set the system accounts in Windows 2000 -- the principal reason thast XP added an "apply all settings to the current user account and to the defsult user profile" checkbox. On the whole is the wrong choice to try to byild the site with a dependence on the server's settings -- after all, another site might have a similar requirement for a totally different locale. The "hack" to set the information is best considered the feature of a site, as it makes the site independent of the whims of anyone who changes settings. -- MichKa [MS] NLS Collation/Locale/Keyboard Technical Lead Globalization Infrastructure, Fonts, and Tools Microsoft Windows International Division This posting is provided "AS IS" with no warranties, and confers no rights. [quoted text, click to view] "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote in message news:A6776FB6-A06A-445C-8206-8443718784EF@microsoft.com... > Ok, so that begs the question "How do you set the regional settings for the > System account?" When I made the changes, I was logged in as Administrator. > > "Michael (michka) Kaplan [MS]" wrote: > > > That is entirely expected. When you look at Regional Options you are not > > logged in under the system account; you are logged in as you. Therefore, > > what you set there has no impact on what the system account settings are. > > > > > > -- > > MichKa [MS] > > NLS Collation/Locale/Keyboard Technical Lead > > Globalization Infrastructure, Fonts, and Tools > > Microsoft Windows International Division > > > > This posting is provided "AS IS" with > > no warranties, and confers no rights. > > > > > > > > "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote in message > > news:D749CD8A-2F7B-46CA-878C-88E5B2E06A3F@microsoft.com... > > > It's a service running under the System account. When the service first > > > starts I check the culture of the current thread and no matter what's set > > in > > > Control Panel it always reports English. > > > > > > "Michael (michka) Kaplan [MS]" wrote: > > > > > > > The one you see in Regional Options on a server is not necessarily the > > one > > > > that an application would see -- if that account is running under > > another > > > > user account and/or the profile is not loaded, the settings would not > > apply. > > > > > > > > Can you give some more info about the application, the context in which > > it > > > > is running, etc.? > > > > > > > > > > > > -- > > > > MichKa [MS] > > > > NLS Collation/Locale/Keyboard Technical Lead > > > > Globalization Infrastructure, Fonts, and Tools > > > > Microsoft Windows International Division > > > > > > > > This posting is provided "AS IS" with > > > > no warranties, and confers no rights. > > > > > > > > > > > > "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote in > > message > > > > news:369134BE-A1A6-411D-B454-659E154A58FD@microsoft.com... > > > > > I have an issue where a .NET application is not seeing the correct > > culture > > > > of > > > > > a server as defined within the "Regional Options" settings of Control > > > > Panel. > > > > > I've gone through and set all of the options to German, but when my > > app > > > > > executes it reports the CurrentCulture (of the active thread) as > > English. > > > > > What am I missing? The server is a Win2k Terminal O/S. > > > > > > > > > > Thanks > > > > > Eric > > > > > > > > > > P.S. I know I can manually set the culture for the thread in code, but > > it > > > > > seems to me that I shouldn't have too. > > > > > > > > > > > > > > > > > >
Well, that's a problem since the account that most services use to execute is the system account. It doesn't make a whole lot of sense that you can essentially set a box up to run as a localized OS for everything except the system account. What's the point? Thanks for your help. Eric [quoted text, click to view] "Michael (michka) Kaplan [MS]" wrote: > The user named "Administrator" is not the system account (you can run a > service as "Administrator" so clearly they are different things). > > There is no UI method to set the system accounts in Windows 2000 -- the > principal reason thast XP added an "apply all settings to the current user > account and to the defsult user profile" checkbox. > > On the whole is the wrong choice to try to byild the site with a dependence > on the server's settings -- after all, another site might have a similar > requirement for a totally different locale. The "hack" to set the > information is best considered the feature of a site, as it makes the site > independent of the whims of anyone who changes settings. > > > -- > MichKa [MS] > NLS Collation/Locale/Keyboard Technical Lead > Globalization Infrastructure, Fonts, and Tools > Microsoft Windows International Division > > This posting is provided "AS IS" with > no warranties, and confers no rights. > > > > "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote in message > news:A6776FB6-A06A-445C-8206-8443718784EF@microsoft.com... > > Ok, so that begs the question "How do you set the regional settings for > the > > System account?" When I made the changes, I was logged in as > Administrator. > > > > "Michael (michka) Kaplan [MS]" wrote: > > > > > That is entirely expected. When you look at Regional Options you are not > > > logged in under the system account; you are logged in as you. Therefore, > > > what you set there has no impact on what the system account settings > are. > > > > > > > > > -- > > > MichKa [MS] > > > NLS Collation/Locale/Keyboard Technical Lead > > > Globalization Infrastructure, Fonts, and Tools > > > Microsoft Windows International Division > > > > > > This posting is provided "AS IS" with > > > no warranties, and confers no rights. > > > > > > > > > > > > "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote in > message > > > news:D749CD8A-2F7B-46CA-878C-88E5B2E06A3F@microsoft.com... > > > > It's a service running under the System account. When the service > first > > > > starts I check the culture of the current thread and no matter what's > set > > > in > > > > Control Panel it always reports English. > > > > > > > > "Michael (michka) Kaplan [MS]" wrote: > > > > > > > > > The one you see in Regional Options on a server is not necessarily > the > > > one > > > > > that an application would see -- if that account is running under > > > another > > > > > user account and/or the profile is not loaded, the settings would > not > > > apply. > > > > > > > > > > Can you give some more info about the application, the context in > which > > > it > > > > > is running, etc.? > > > > > > > > > > > > > > > -- > > > > > MichKa [MS] > > > > > NLS Collation/Locale/Keyboard Technical Lead > > > > > Globalization Infrastructure, Fonts, and Tools > > > > > Microsoft Windows International Division > > > > > > > > > > This posting is provided "AS IS" with > > > > > no warranties, and confers no rights. > > > > > > > > > > > > > > > "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote in > > > message > > > > > news:369134BE-A1A6-411D-B454-659E154A58FD@microsoft.com... > > > > > > I have an issue where a .NET application is not seeing the correct > > > culture > > > > > of > > > > > > a server as defined within the "Regional Options" settings of > Control > > > > > Panel. > > > > > > I've gone through and set all of the options to German, but when > my > > > app > > > > > > executes it reports the CurrentCulture (of the active thread) as > > > English. > > > > > > What am I missing? The server is a Win2k Terminal O/S. > > > > > > > > > > > > Thanks > > > > > > Eric > > > > > > > > > > > > P.S. I know I can manually set the culture for the thread in code, > but > > > it > > > > > > seems to me that I shouldn't have too. > > > > > > > > > > > > > > > > > > > > > > > > > >
Well, that is one of the reason why the functionality was added in XP and beyond. But the localized OS does not have this problem -- if all the settings are for some other language then all accounts will be as well. It is only when you are changing the setting for your user account and expecting it to go everywhere (even though it is called the "user locale"). That is not a scenario that came up heavily until after Windows 2000 had shipped. You are no really localizing an operating system when you change the user locale, though. You are making a change in preferences, and you pronbably should not ever have this setting be hardcoded to anything since users may want to log on and change theur preferences. If you make the appropriate changes in the .DEFAULT subkey, if you mount the ntuser.dat hives of all of the appropriate accounts and modivy them as well, then you can make it work. Its a non-trivial effort, which is why that single small checkbox is a bit misleading in terms of the complexity of the issue. Microsoft has to do more than handle the specific scenario you have here -- we have to handle web servers with hundreds of sites, all of whom might want different behavior. The plan you envision is not very scalable since even a second user's preference would mess up an entire web site's processing. In that sense, the plan is not as very good one since even moving to a new server meansd you are right back in a tough situation. If you want to make changes, your best answer (and certainly the most supported answer!) is to set it in your website. -- MichKa [MS] NLS Collation/Locale/Keyboard Technical Lead Globalization Infrastructure, Fonts, and Tools Microsoft Windows International Division This posting is provided "AS IS" with no warranties, and confers no rights. [quoted text, click to view] "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote in message news:E1C4B87C-B7CF-4035-935D-6D588E655982@microsoft.com... > Well, that's a problem since the account that most services use to execute is > the system account. It doesn't make a whole lot of sense that you can > essentially set a box up to run as a localized OS for everything except the > system account. What's the point? > > Thanks for your help. > Eric > > "Michael (michka) Kaplan [MS]" wrote: > > > The user named "Administrator" is not the system account (you can run a > > service as "Administrator" so clearly they are different things). > > > > There is no UI method to set the system accounts in Windows 2000 -- the > > principal reason thast XP added an "apply all settings to the current user > > account and to the defsult user profile" checkbox. > > > > On the whole is the wrong choice to try to byild the site with a dependence > > on the server's settings -- after all, another site might have a similar > > requirement for a totally different locale. The "hack" to set the > > information is best considered the feature of a site, as it makes the site > > independent of the whims of anyone who changes settings. > > > > > > -- > > MichKa [MS] > > NLS Collation/Locale/Keyboard Technical Lead > > Globalization Infrastructure, Fonts, and Tools > > Microsoft Windows International Division > > > > This posting is provided "AS IS" with > > no warranties, and confers no rights. > > > > > > > > "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote in message > > news:A6776FB6-A06A-445C-8206-8443718784EF@microsoft.com... > > > Ok, so that begs the question "How do you set the regional settings for > > the > > > System account?" When I made the changes, I was logged in as > > Administrator. > > > > > > "Michael (michka) Kaplan [MS]" wrote: > > > > > > > That is entirely expected. When you look at Regional Options you are not > > > > logged in under the system account; you are logged in as you. Therefore, > > > > what you set there has no impact on what the system account settings > > are. > > > > > > > > > > > > -- > > > > MichKa [MS] > > > > NLS Collation/Locale/Keyboard Technical Lead > > > > Globalization Infrastructure, Fonts, and Tools > > > > Microsoft Windows International Division > > > > > > > > This posting is provided "AS IS" with > > > > no warranties, and confers no rights. > > > > > > > > > > > > > > > > "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote in > > message > > > > news:D749CD8A-2F7B-46CA-878C-88E5B2E06A3F@microsoft.com... > > > > > It's a service running under the System account. When the service > > first > > > > > starts I check the culture of the current thread and no matter what's > > set > > > > in > > > > > Control Panel it always reports English. > > > > > > > > > > "Michael (michka) Kaplan [MS]" wrote: > > > > > > > > > > > The one you see in Regional Options on a server is not necessarily > > the > > > > one > > > > > > that an application would see -- if that account is running under > > > > another > > > > > > user account and/or the profile is not loaded, the settings would > > not > > > > apply. > > > > > > > > > > > > Can you give some more info about the application, the context in > > which > > > > it > > > > > > is running, etc.? > > > > > > > > > > > > > > > > > > -- > > > > > > MichKa [MS] > > > > > > NLS Collation/Locale/Keyboard Technical Lead > > > > > > Globalization Infrastructure, Fonts, and Tools > > > > > > Microsoft Windows International Division > > > > > > > > > > > > This posting is provided "AS IS" with > > > > > > no warranties, and confers no rights. > > > > > > > > > > > > > > > > > > "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote in > > > > message > > > > > > news:369134BE-A1A6-411D-B454-659E154A58FD@microsoft.com... > > > > > > > I have an issue where a .NET application is not seeing the correct > > > > culture > > > > > > of > > > > > > > a server as defined within the "Regional Options" settings of > > Control > > > > > > Panel. > > > > > > > I've gone through and set all of the options to German, but when > > my > > > > app > > > > > > > executes it reports the CurrentCulture (of the active thread) as > > > > English. > > > > > > > What am I missing? The server is a Win2k Terminal O/S. > > > > > > > > > > > > > > Thanks > > > > > > > Eric > > > > > > > > > > > > > > P.S. I know I can manually set the culture for the thread in code, > > but > > > > it > > > > > > > seems to me that I shouldn't have too. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
Ok, one more question. If I create a parameter in my .config file that controls the culture will I have to set the Culture manually for every thread in the managed thread pool, or can I simply set the culture from the main thread in the service and have it propegated to everything else in the AppDomain? Thanks again. Eric [quoted text, click to view] "Michael (michka) Kaplan [MS]" wrote: > Well, that is one of the reason why the functionality was added in XP and > beyond. > > But the localized OS does not have this problem -- if all the settings are > for some other language then all accounts will be as well. It is only when > you are changing the setting for your user account and expecting it to go > everywhere (even though it is called the "user locale"). That is not a > scenario that came up heavily until after Windows 2000 had shipped. > > You are no really localizing an operating system when you change the user > locale, though. You are making a change in preferences, and you pronbably > should not ever have this setting be hardcoded to anything since users may > want to log on and change theur preferences. > > If you make the appropriate changes in the .DEFAULT subkey, if you mount > the ntuser.dat hives of all of the appropriate accounts and modivy them as > well, then you can make it work. Its a non-trivial effort, which is why that > single small checkbox is a bit misleading in terms of the complexity of the > issue. > > Microsoft has to do more than handle the specific scenario you have here -- > we have to handle web servers with hundreds of sites, all of whom might want > different behavior. The plan you envision is not very scalable since even a > second user's preference would mess up an entire web site's processing. In > that sense, the plan is not as very good one since even moving to a new > server meansd you are right back in a tough situation. > > If you want to make changes, your best answer (and certainly the most > supported answer!) is to set it in your website. > > > -- > MichKa [MS] > NLS Collation/Locale/Keyboard Technical Lead > Globalization Infrastructure, Fonts, and Tools > Microsoft Windows International Division > > This posting is provided "AS IS" with > no warranties, and confers no rights. > > > "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote in message > news:E1C4B87C-B7CF-4035-935D-6D588E655982@microsoft.com... > > Well, that's a problem since the account that most services use to execute > is > > the system account. It doesn't make a whole lot of sense that you can > > essentially set a box up to run as a localized OS for everything except > the > > system account. What's the point? > > > > Thanks for your help. > > Eric > > > > "Michael (michka) Kaplan [MS]" wrote: > > > > > The user named "Administrator" is not the system account (you can run a > > > service as "Administrator" so clearly they are different things). > > > > > > There is no UI method to set the system accounts in Windows 2000 -- the > > > principal reason thast XP added an "apply all settings to the current > user > > > account and to the defsult user profile" checkbox. > > > > > > On the whole is the wrong choice to try to byild the site with a > dependence > > > on the server's settings -- after all, another site might have a similar > > > requirement for a totally different locale. The "hack" to set the > > > information is best considered the feature of a site, as it makes the > site > > > independent of the whims of anyone who changes settings. > > > > > > > > > -- > > > MichKa [MS] > > > NLS Collation/Locale/Keyboard Technical Lead > > > Globalization Infrastructure, Fonts, and Tools > > > Microsoft Windows International Division > > > > > > This posting is provided "AS IS" with > > > no warranties, and confers no rights. > > > > > > > > > > > > "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote in > message > > > news:A6776FB6-A06A-445C-8206-8443718784EF@microsoft.com... > > > > Ok, so that begs the question "How do you set the regional settings > for > > > the > > > > System account?" When I made the changes, I was logged in as > > > Administrator. > > > > > > > > "Michael (michka) Kaplan [MS]" wrote: > > > > > > > > > That is entirely expected. When you look at Regional Options you are > not > > > > > logged in under the system account; you are logged in as you. > Therefore, > > > > > what you set there has no impact on what the system account settings > > > are. > > > > > > > > > > > > > > > -- > > > > > MichKa [MS] > > > > > NLS Collation/Locale/Keyboard Technical Lead > > > > > Globalization Infrastructure, Fonts, and Tools > > > > > Microsoft Windows International Division > > > > > > > > > > This posting is provided "AS IS" with > > > > > no warranties, and confers no rights. > > > > > > > > > > > > > > > > > > > > "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote in > > > message > > > > > news:D749CD8A-2F7B-46CA-878C-88E5B2E06A3F@microsoft.com... > > > > > > It's a service running under the System account. When the service > > > first > > > > > > starts I check the culture of the current thread and no matter > what's > > > set > > > > > in > > > > > > Control Panel it always reports English. > > > > > > > > > > > > "Michael (michka) Kaplan [MS]" wrote: > > > > > > > > > > > > > The one you see in Regional Options on a server is not > necessarily > > > the > > > > > one > > > > > > > that an application would see -- if that account is running > under > > > > > another > > > > > > > user account and/or the profile is not loaded, the settings > would > > > not > > > > > apply. > > > > > > > > > > > > > > Can you give some more info about the application, the context > in > > > which > > > > > it > > > > > > > is running, etc.? > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > MichKa [MS] > > > > > > > NLS Collation/Locale/Keyboard Technical Lead > > > > > > > Globalization Infrastructure, Fonts, and Tools > > > > > > > Microsoft Windows International Division > > > > > > > > > > > > > > This posting is provided "AS IS" with > > > > > > > no warranties, and confers no rights. > > > > > > > > > > > > > > > > > > > > > "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote > in > > > > > message > > > > > > > news:369134BE-A1A6-411D-B454-659E154A58FD@microsoft.com... > > > > > > > > I have an issue where a .NET application is not seeing the > correct > > > > > culture > > > > > > > of > > > > > > > > a server as defined within the "Regional Options" settings of > > > Control > > > > > > > Panel. > > > > > > > > I've gone through and set all of the options to German, but > when > > > my > > > > > app > > > > > > > > executes it reports the CurrentCulture (of the active thread) > as > > > > > English.
I believe the intention of the setting in the config file is to affect all threads. But I would suggest testing it first to make sure the implementation matches my vague recollection of the intention. :-) -- MichKa [MS] NLS Collation/Locale/Keyboard Technical Lead Globalization Infrastructure, Fonts, and Tools Microsoft Windows International Division This posting is provided "AS IS" with no warranties, and confers no rights. [quoted text, click to view] "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote in message news:F3005F91-BF9C-4810-8195-5D4E9246C7D9@microsoft.com... > Ok, one more question. If I create a parameter in my .config file that > controls the culture will I have to set the Culture manually for every thread > in the managed thread pool, or can I simply set the culture from the main > thread in the service and have it propegated to everything else in the > AppDomain? > > Thanks again. > Eric > > "Michael (michka) Kaplan [MS]" wrote: > > > Well, that is one of the reason why the functionality was added in XP and > > beyond. > > > > But the localized OS does not have this problem -- if all the settings are > > for some other language then all accounts will be as well. It is only when > > you are changing the setting for your user account and expecting it to go > > everywhere (even though it is called the "user locale"). That is not a > > scenario that came up heavily until after Windows 2000 had shipped. > > > > You are no really localizing an operating system when you change the user > > locale, though. You are making a change in preferences, and you pronbably > > should not ever have this setting be hardcoded to anything since users may > > want to log on and change theur preferences. > > > > If you make the appropriate changes in the .DEFAULT subkey, if you mount > > the ntuser.dat hives of all of the appropriate accounts and modivy them as > > well, then you can make it work. Its a non-trivial effort, which is why that > > single small checkbox is a bit misleading in terms of the complexity of the > > issue. > > > > Microsoft has to do more than handle the specific scenario you have here -- > > we have to handle web servers with hundreds of sites, all of whom might want > > different behavior. The plan you envision is not very scalable since even a > > second user's preference would mess up an entire web site's processing. In > > that sense, the plan is not as very good one since even moving to a new > > server meansd you are right back in a tough situation. > > > > If you want to make changes, your best answer (and certainly the most > > supported answer!) is to set it in your website. > > > > > > -- > > MichKa [MS] > > NLS Collation/Locale/Keyboard Technical Lead > > Globalization Infrastructure, Fonts, and Tools > > Microsoft Windows International Division > > > > This posting is provided "AS IS" with > > no warranties, and confers no rights. > > > > > > "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote in message > > news:E1C4B87C-B7CF-4035-935D-6D588E655982@microsoft.com... > > > Well, that's a problem since the account that most services use to execute > > is > > > the system account. It doesn't make a whole lot of sense that you can > > > essentially set a box up to run as a localized OS for everything except > > the > > > system account. What's the point? > > > > > > Thanks for your help. > > > Eric > > > > > > "Michael (michka) Kaplan [MS]" wrote: > > > > > > > The user named "Administrator" is not the system account (you can run a > > > > service as "Administrator" so clearly they are different things). > > > > > > > > There is no UI method to set the system accounts in Windows 2000 -- the > > > > principal reason thast XP added an "apply all settings to the current > > user > > > > account and to the defsult user profile" checkbox. > > > > > > > > On the whole is the wrong choice to try to byild the site with a > > dependence > > > > on the server's settings -- after all, another site might have a similar > > > > requirement for a totally different locale. The "hack" to set the > > > > information is best considered the feature of a site, as it makes the > > site > > > > independent of the whims of anyone who changes settings. > > > > > > > > > > > > -- > > > > MichKa [MS] > > > > NLS Collation/Locale/Keyboard Technical Lead > > > > Globalization Infrastructure, Fonts, and Tools > > > > Microsoft Windows International Division > > > > > > > > This posting is provided "AS IS" with > > > > no warranties, and confers no rights. > > > > > > > > > > > > > > > > "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote in > > message > > > > news:A6776FB6-A06A-445C-8206-8443718784EF@microsoft.com... > > > > > Ok, so that begs the question "How do you set the regional settings > > for > > > > the > > > > > System account?" When I made the changes, I was logged in as > > > > Administrator. > > > > > > > > > > "Michael (michka) Kaplan [MS]" wrote: > > > > > > > > > > > That is entirely expected. When you look at Regional Options you are > > not > > > > > > logged in under the system account; you are logged in as you. > > Therefore, > > > > > > what you set there has no impact on what the system account settings > > > > are. > > > > > > > > > > > > > > > > > > -- > > > > > > MichKa [MS] > > > > > > NLS Collation/Locale/Keyboard Technical Lead > > > > > > Globalization Infrastructure, Fonts, and Tools > > > > > > Microsoft Windows International Division > > > > > > > > > > > > This posting is provided "AS IS" with > > > > > > no warranties, and confers no rights. > > > > > > > > > > > > > > > > > > > > > > > > "Eric D. Wilson" <EricDWilson@discussions.microsoft.com> wrote in > > > > message > > > > > > news:D749CD8A-2F7B-46CA-878C-88E5B2E06A3F@microsoft.com... > > > > > > > It's a service running under the System account. When the service > > > > first > > > > > > > starts I check the culture of the current thread and no matter > > what's > > > > set > > > > > > in > > > > > > > Control Panel it always reports English. > > > > > > > > > > > > > > "Michael (michka) Kaplan [MS]" wrote: > > > > > > > > > > > > > > > The one you see in Regional Options on a server is not > > necessarily > > > > the > > > > > > one > > > > > > > > that an application would see -- if that account is running > > under > > > > > > another > > > > > > > > user account and/or the profile is not loaded, the settings > > would > > > > not > > > > > > apply. > > > > > > > > > > > > > > > > Can you give some more info about the application, the context > > in > > > > which > > > > > > it > > > > > > > > is running, etc.? > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > MichKa [MS] > > > > > > > > NLS Collation/Locale/Keyboard Technical Lead
Don't see what you're looking for? Try a search.
|
|
|