473,385 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Change output language runtime forms

Gwl
I'm writing an application in which the user can change the default
ouput language while the program is running. I have no problem to do it
when there is only a form opened, but if I have a situation like a
second form opened I don't know how I could change the otuput language
in the main form and in all the background forms. Any advice?

Thanks, G.

Nov 17 '05 #1
2 3043
Gwl wrote:
I'm writing an application in which the user can change the default
ouput language while the program is running. I have no problem to do
it when there is only a form opened, but if I have a situation like a
second form opened I don't know how I could change the otuput language
in the main form and in all the background forms. Any advice?


You'll have to go through the original form and change the titles of the
control. I assume that this second form changes the CurrentUICulture on
the GUI thread. If this is the case then add a method to your main form
that the second form can call. Now look in the InitializeComonent and
copy the code that initializes the ResourceManager and copy any code
that uses the ResourceManager object.

When a form is created a ResourceManager is created, this searches for,
and loads a 'satellite assembly' which has the localised resource. The
code then calls the ResourceManager and asks for a particular item,
RsourceManager reads the item from the localised resource in the
satellite assembly and uses this to initialise controls on the form. You
just need to replicate this code.

Richard
--
http://www.grimes.demon.co.uk/workshops/fusionWS.htm
http://www.grimes.demon.co.uk/workshops/securityWS.htm
Nov 17 '05 #2
Gwl
Sorry if I reply so late.

My approch to write an application that can show otput message in
different languages is not the "standard" one. I don't use any of the
features related to the CurrentUICulture (even if I tried it). I have a
database of all the msgs that I write on the screen (and even of the
message on buttons etc.) and I use the information inside that database
for the output on the screen. The database is easy to modify, update
(eventually with new languages) and maintain and that was my first
concern.

As I told, my program change correctly the language of the main form
but if there are other form behind these are not updated. Any help?

Thanks, Gwl

Richard Grimes wrote:
Gwl wrote:
I'm writing an application in which the user can change the default
ouput language while the program is running. I have no problem to do
it when there is only a form opened, but if I have a situation like a
second form opened I don't know how I could change the otuput language
in the main form and in all the background forms. Any advice?


You'll have to go through the original form and change the titles of the
control. I assume that this second form changes the CurrentUICulture on
the GUI thread. If this is the case then add a method to your main form
that the second form can call. Now look in the InitializeComonent and
copy the code that initializes the ResourceManager and copy any code
that uses the ResourceManager object.

When a form is created a ResourceManager is created, this searches for,
and loads a 'satellite assembly' which has the localised resource. The
code then calls the ResourceManager and asks for a particular item,
RsourceManager reads the item from the localised resource in the
satellite assembly and uses this to initialise controls on the form. You
just need to replicate this code.

Richard
--
http://www.grimes.demon.co.uk/workshops/fusionWS.htm
http://www.grimes.demon.co.uk/workshops/securityWS.htm


Nov 24 '05 #3

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

Similar topics

2
by: Bj?rn | last post by:
HY, my problem is the following: I want to give a very big application the ability, to change the language at runtime. It's written in Visual C++ 6.0. All language depending strings and so...
13
by: Andrew | last post by:
I use conditional compiler constants, set through the VBA IDE in Tools, <projectname> Properties, that I refer to throughout my code to control which code is used during development, and which...
5
by: chris | last post by:
Hello all - Preface: This isn't a C# Builder question but if you happen to have the answer to my primary problem, please feel free to chime in ;-) I'm using Borland's C# Builder (Personal)...
2
by: Sanjeeva Reddy | last post by:
hai Anti Keskinen, i have used the following code MyListView->LargeImageList->ImageSize = gcnew System::Drawing::Size(100, 100); // Sets large image size to 100, 100 here i am getting error...
1
by: Leo | last post by:
I created a user control which is some text contained in a HtmlTable. I put this control into main form. I would like to have the ability to move this control around in the main form. I think one...
0
by: zeng.hui.stephen | last post by:
I download the demo http://msdn.microsoft.com/msdnmag/issues/02/10/cuttingedge/. I inherite the demo, and write my code. I want to use Hook to monitor C++ Edit change. I use a C# form...
4
by: Hans Kesting | last post by:
Can I change the language of an existing form on the fly? Say I have two radiobuttons: "dutch" and "english". When the user selects one, the form must switch to the selected language. Is that...
0
by: Carlos Cruz | last post by:
Hi, I'm trying to make a multilanguage application. I manage to create the forms resource files for each language and to read them (rm.GetString("Label1.Text", pCultureInfo)), but I need to...
2
by: itsenthil | last post by:
This is my UserControl(ascx) coding, it is not working plz help me to rectify the error.....what is wrong in that one..... <%@ Control Language="vb" AutoEventWireup="false"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...

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.