473,795 Members | 3,331 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

WPF: Change the culture when application runs.

Hi all,

I’m very very new in C#/WPF world, but this fascinates me more and more. Now
I must find a way how our future application will use the localization /
globalization. I did all the steps I found in MSDN to create this (UID,
LocBaml, satellite, etc.) and I it works perfect (a little bit complicated
but anyway it works). The application starts in the OS culture starts, also
if I put at the beginning this code:
public App()
{
Thread.CurrentT hread.CurrentUI Culture = new CultureInfo("de-DE");
//Thread.CurrentT hread.CurrentUI Culture = new
CultureInfo("en-US");
}
It works perfect.
Now I try (and I spent too much time for this issue) to change the culture
online, when the application runs. Something like:
private void CheckLanguage(o bject sender, RoutedEventArgs e)
{
Thread.CurrentT hread.CurrentUI Culture = new CultureInfo((ge rman)
? "de-DE" : "en-US", true);
}
When the user clicks a button to change from german to English. I guess I’m
too naive to believe that, but I don’t know what should I write so to get my
current main window show all stuff in other language?
For any idea thank you in advance!

Best regards,
Emanuil
Nov 20 '07 #1
0 3225

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2378
by: karen.mcdonagh | last post by:
Hi, I have generated resource files for a different language and generated a satellite assembly for it, signed it and placed it in the GAC. When I change the UI culture within the code the application displays the correct form for the culture. However when I simply change the language and locale settings in the control panel it doesn't pick it up. Any ideas would be greatly appreciated
4
1998
by: Shapper | last post by:
Hello, I have this image in my HTML code: <img src="images/en-US/myImage.jpg" /> I want to change the URL using the value of a Session variable. <img src="images/ Session("culture") Value /myImage.jpg" /> This is what I did: <img src='images/<%# Session("culture") %>/myImage.jpg' />
1
1598
by: brett | last post by:
Using MS Expressions Interactive, if I design a site that uses WPF functionality, (I have .NET 3.0 on my developer machine) how does it work once uploaded onto an ASP.NET 2.0 server that doesn't have the ..NET 3.0 framework installed. This question may not apply depending on the above answer. Many developers are using a hosting service for their sites. It's likely the majority don't have .NET 3.0 installed. Does this mean it will be...
4
2222
by: timor.super | last post by:
Hi group, I have a strange error. I'm a beginner with dotnet 3.0, when i try to run an wpf application from my windows explorer, the application crash. For example, i've downloaded the demo project at this url : http://www.codeproject.com/useritems/wpfdemo1.asp, that contains an exe and the source code.
0
1481
by: SapAddonDeveloper | last post by:
Hello, I am writing an add-on using vbnet/c# that runs inside a Sap B1 application. I need to be able to change the input language (little blue white icon on the system tray) on certain occasions. The add-on is basically an exe that runs in a different thread from the main sap program. Using code like:
11
5178
by: Don | last post by:
I have a WPF application in VB in VSTS 2008 RTM. I am trying to "blink" (momentarily clear) a field of data if the data is reloaded from the database to give the user some visual indication of the LOAD operation. So on the LOAD button I clear the text fields, do mainCanvas.UpdateLayout( ), and the reload the text field from the database. But the text fields are not cleared long enough to see them blink.
5
2723
by: Carl Ganz | last post by:
I have a client that is looking at converting a massive WinForms .NET application to a server-based application in the next few years. The topic of ASP.NET came up and I have some doubts about using it given the introduction of WPF. Here's my thinking: When classic ASP came out around 1995 or so, web applications were delivered as HTML and Javascript and run in a browser. Today, with ASP.NET 3.5, web applictations are still delivered as...
23
4568
by: raylopez99 | last post by:
Here I am learning WinForms and two months into it I learn there's a WPF API that is coming out. Is this WPF out yet, and is it a threat to WinForms, in the sense that all the library routines I memorize and/ or familiarize myself in WinForms will disappear in WPF? I did note in one early version of C#, the non-generic "ArrayList" was replaced by the generic and template <based List, but that kind of change is not a big deal. If WPF...
5
2631
by: PvdG42 | last post by:
Probably a simple beginner question, but... In VS 2008, C# WPF Windows Project: how to find the event list associated with a given control that has been placed on the form? I note that the "traditional" double-click the control instance produces the default event procedure shell, but how/where to find the event list for that control to create a shell for a non-default event? Seems it should be a basic feature, but darned if I can find it.
0
9519
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,...
0
10435
Oralloy
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...
0
10213
jinu1996
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...
1
10163
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,...
0
9037
agi2029
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...
1
7538
isladogs
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...
0
5436
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...
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2920
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.