Hello,
I am trying to learn how to build a localizable windows application
and am having trouble getting alternate languages to display when if
stop hardcoding the culture settings. The line where I hard code the
CurrentUICultur e is in the form's constructor and is like:
Thread.CurrentT hread.CurrentUI Culture = new CultureInfo("pt-BR");
When this line is present, the form displays in Portuguese.
However, once I comment out this line, I always see English, and never
the other languages. I'm trying to display the Portuguese form
without hardcoding the culture setting.
I think this is related. The variable
"System.Globali zation.CultureI nfo.CurrentUICu lture" always returns the
value "en-US". I am guessing that if the value of this variable
changes, then so would the localized resourced file used in my
application.
Where in the Win2000 OS do I change this value? I was thinking it
would be under Regional Options in the Control Panel, but nothing I
change seems to affect that variable.
Thanks,
-- Ken 1 4559
Ken,
Here's what the MSDN help doc says:
-------------------------------------------------
When a thread is started, its UI culture is initially determined by using
GetUserDefaultU ILanguage from the Windows API
-------------------------------------------------
--
Carsten Thomsen
Enterprise Development with Visual Studio .NET, UML, and MSF http://www.apress.com/book/bookDisplay.html?bID=105
"Ken" <ke*******@hotm ail.com> wrote in message
news:9a******** *************** ***@posting.goo gle.com... Hello,
I am trying to learn how to build a localizable windows application and am having trouble getting alternate languages to display when if stop hardcoding the culture settings. The line where I hard code the CurrentUICultur e is in the form's constructor and is like:
Thread.CurrentT hread.CurrentUI Culture = new CultureInfo("pt-BR");
When this line is present, the form displays in Portuguese.
However, once I comment out this line, I always see English, and never the other languages. I'm trying to display the Portuguese form without hardcoding the culture setting.
I think this is related. The variable "System.Globali zation.CultureI nfo.CurrentUICu lture" always returns the value "en-US". I am guessing that if the value of this variable changes, then so would the localized resourced file used in my application.
Where in the Win2000 OS do I change this value? I was thinking it would be under Regional Options in the Control Panel, but nothing I change seems to affect that variable.
Thanks, -- Ken This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Andrey Tatarinov |
last post by:
Hi.
It would be great to be able to reverse usage/definition parts in
haskell-way with "where" keyword. Since Python 3 would miss lambda, that
would be extremly useful for creating readable sources.
Usage could be something like:
>>> res = where:
>>> def f(x):
|
by: Ken |
last post by:
Hello,
I am trying to learn how to build a localizable windows application
and am having trouble getting alternate languages to display when if
stop hardcoding the culture settings. The line where I hard code the
CurrentUICulture is in the form's constructor and is like:
Thread.CurrentThread.CurrentUICulture = new CultureInfo("pt-BR");
When this line is present, the form displays in Portuguese.
|
by: Olaf Baeyens |
last post by:
A question: (C#, C++)
If I use iValue.ToString("000000000000",CultureInfo::CurrentUICulture));
The I get a string with a fixed lengt if format: "000000542663"
But since I want the leading "0" gone, but still have the fixed string
length I replaced it with this:
iValue.ToString("###########0",CultureInfo::CurrentUICulture));
But to my suprise I get "542663" while I expected : " 542663" (note the
|
by: DZoid |
last post by:
Hi,
I have an asp.net page that uses a component in my business tier, which in
turn uses a component in my data tier. The business and data tiers are in
separate assemblies. I set Thread.CurrentThread.CurrentCulture and
Thread.CurrentThread.CurrentUICulture in the .aspx page.
The asp.net app, business tier, and data tier each have their own resource
files.
|
by: Reny J Joseph Thuthikattu |
last post by:
Hi,
If i put a month callender on a asp.net web form and specify the culture on
the page directive like
'<%@ Page language="c#" Culture="ar-OM"%>
it will display the Month callender in arabic.
I want the same result for my windows application.Can any one tell me how
can i do that?
| |
by: Edge |
last post by:
hi,
I am saving the user selected culture in a session variable so I can apply
it back to all pages when refreshed and then load the proper .resx values.
For that I am using global.asax
|
by: clintonG |
last post by:
I tell ya, I'd really like to study a base implementation or have an outline
of what I need to build a base implementation of a localized ASP.NET 2.0
page, an application better yet with at least some navigation.
Not to be seen - yet - at MSDN. I looked at
news://microsoft.public.platform.localization but there's only one news
article showing a pair of ASCII hooters. I kid you not. A set of great big
ASCII titties and nothing else.
...
|
by: Tedmond |
last post by:
Dear all,
My application allows users to switch languages at run time. I use the
following code to change the UI Culture but all controls are remaining
unchanged.
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
Why? Anything that I need to do in order to refresh the controls?
|
by: spig.marco |
last post by:
Hi to all!,
I've downloaded .net Framework SDK 2.0 and I have VB.NET2005 Express
Edition, I would like to create multilanguage systems that changes
with radio button.
With Windows Localization Resource I changed the label of my
FrmMain.vb! and created automaticaly FrmMain.en.resx.
When i lunch the command in FrmMain_load()
....
Thread.CurrentThread.CurrentUICulture = New CultureInfo("en")
|
by: =?Utf-8?B?SmVu?= |
last post by:
I could get the correct System.Globalization.CultureInfo.CurrentCulture and
System.Globalization.CultureInfo.CurrentUICulture when the my WPF application
first started. While my application was running, I went to Control Panel -
Regionals and Language Options to change the Format from English (United
States) to Thai (ThaiLand), clicking a button in my application to get the
latest System.Globalization.CultureCulture and...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |