![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I have a Windows C# app developed using VS2003 and I need to localize it into German and French. (I did not create the project) I have come across a few problems and I would really appreciate any help. 1. The project is made up of Forms and Panels. I notice that if I click on a panel dialog and view its properties then I get no option to set the localization to true or to change the language for it. How can I localize a Panel, I need to do this because the Panel hosts buttons, Labels and Text boxes. 2. Also I need to localize some of the strings in code. All the examples I have seen have walked me through the steps where I create 3 .resx files e.g WinFormStrings.resx (English) WinFormStrings.de-DE.resx (German)and WinFormStrings.fr-FR.resx (French). See: http://msdn2.microsoft.com/en-US/library/y99d1cd3.aspx. When I do this the resource manager does not pull out any of the strings I enter in the resource files. Have I missed something but if you click 'Show all files' in the Solution explorer is appears that Visual Studio generates a .resx file for every Form anyway, so why do we need to add in another one for English? Thanks in advance for any help -------------------------------- From: Ryan Cush |
#3
| |||
| |||
|
|
2) I remember to have had already this problem. This is because I didn't use set correctly the parameters on the instruction "new ResourceManager". It is necessary to mention the namespace name before the resource name (without extension), and it is case sensitive. INCORRECT: ResourceManager rm = new ResourceManager("resourcefile", Assembly.GetExecutingAssembly()); CORRECT: ResourceManager rm = new ResourceManager("MyNameSpace.resourcefile", Assembly.GetExecutingAssembly()); Thierry HUGUET Microsoft France "Cush" <Cush (AT) discussions (DOT) microsoft.com> a écrit dans le message de news: D5FEE78F-DF3E-45C7-9A7A-CA9BD987C122...soft (DOT) com... Hi, I have a Windows C# app developed using VS2003 and I need to localize it into German and French. (I did not create the project) I have come across a few problems and I would really appreciate any help. 1. The project is made up of Forms and Panels. I notice that if I click on a panel dialog and view its properties then I get no option to set the localization to true or to change the language for it. How can I localize a Panel, I need to do this because the Panel hosts buttons, Labels and Text boxes. 2. Also I need to localize some of the strings in code. All the examples I have seen have walked me through the steps where I create 3 .resx files e.g WinFormStrings.resx (English) WinFormStrings.de-DE.resx (German)and WinFormStrings.fr-FR.resx (French). See: http://msdn2.microsoft.com/en-US/library/y99d1cd3.aspx. When I do this the resource manager does not pull out any of the strings I enter in the resource files. Have I missed something but if you click 'Show all files' in the Solution explorer is appears that Visual Studio generates a .resx file for every Form anyway, so why do we need to add in another one for English? Thanks in advance for any help -------------------------------- From: Ryan Cush |
#4
| |||
| |||
|
|
From: Cush (AT) discussions (DOT) microsoft.com Subject: Re: Small Problem with Localizing Forms Date: Thu, 4 May 2006 03:54:02 -0700 Newsgroups: microsoft.public.dotnet.internationalization Thanks Thierry that has fixed my problem. I now have a new issue: Whenever a form is shown for the first time the InitializeComponent() is called and this is when the resources are pulled from the required .resx files. My problem is that I have a Treeview component which simply shown and hides forms in a main dialog depending on what node is selected.(All the forms are initialised when the program launches of course). Now if I change the language (using a menu selection) and then simply show one of the forms it does noe use the new resource strings I want! Is the only way for a form to use the localized .resx file is to be created from scratch again? Thanks. "Thierry HUGUET [MS]" wrote: 2) I remember to have had already this problem. This is because I didn't use set correctly the parameters on the instruction "new ResourceManager". It is necessary to mention the namespace name before the resource name (without extension), and it is case sensitive. INCORRECT: ResourceManager rm = new ResourceManager("resourcefile", Assembly.GetExecutingAssembly()); CORRECT: ResourceManager rm = new ResourceManager("MyNameSpace.resourcefile", Assembly.GetExecutingAssembly()); Thierry HUGUET Microsoft France "Cush" <Cush (AT) discussions (DOT) microsoft.com> a écrit dans le message de news: D5FEE78F-DF3E-45C7-9A7A-CA9BD987C122...soft (DOT) com... Hi, I have a Windows C# app developed using VS2003 and I need to localize it into German and French. (I did not create the project) I have come across a few problems and I would really appreciate any help. 1. The project is made up of Forms and Panels. I notice that if I click on a panel dialog and view its properties then I get no option to set the localization to true or to change the language for it. How can I localize a Panel, I need to do this because the Panel hosts buttons, Labels and Text boxes. 2. Also I need to localize some of the strings in code. All the examples I have seen have walked me through the steps where I create 3 .resx files e.g WinFormStrings.resx (English) WinFormStrings.de-DE.resx (German)and WinFormStrings.fr-FR.resx (French). See: http://msdn2.microsoft.com/en-US/library/y99d1cd3.aspx. When I do this the resource manager does not pull out any of the strings I enter in the resource files. Have I missed something but if you click 'Show all files' in the Solution explorer is appears that Visual Studio generates a .resx file for every Form anyway, so why do we need to add in another one for English? Thanks in advance for any help -------------------------------- From: Ryan Cush |
#5
| |||
| |||
|
|
Thanks Thierry that has fixed my problem. I now have a new issue: Whenever a form is shown for the first time the InitializeComponent() is called and this is when the resources are pulled from the required .resx files. My problem is that I have a Treeview component which simply shown and hides forms in a main dialog depending on what node is selected.(All the forms are initialised when the program launches of course). Now if I change the language (using a menu selection) and then simply show one of the forms it does noe use the new resource strings I want! Is the only way for a form to use the localized .resx file is to be created from scratch again? Thanks. "Thierry HUGUET [MS]" wrote: 2) I remember to have had already this problem. This is because I didn't use set correctly the parameters on the instruction "new ResourceManager". It is necessary to mention the namespace name before the resource name (without extension), and it is case sensitive. INCORRECT: ResourceManager rm = new ResourceManager("resourcefile", Assembly.GetExecutingAssembly()); CORRECT: ResourceManager rm = new ResourceManager("MyNameSpace.resourcefile", Assembly.GetExecutingAssembly()); Thierry HUGUET Microsoft France "Cush" <Cush (AT) discussions (DOT) microsoft.com> a écrit dans le message de news: D5FEE78F-DF3E-45C7-9A7A-CA9BD987C122...soft (DOT) com... Hi, I have a Windows C# app developed using VS2003 and I need to localize it into German and French. (I did not create the project) I have come across a few problems and I would really appreciate any help. 1. The project is made up of Forms and Panels. I notice that if I click on a panel dialog and view its properties then I get no option to set the localization to true or to change the language for it. How can I localize a Panel, I need to do this because the Panel hosts buttons, Labels and Text boxes. 2. Also I need to localize some of the strings in code. All the examples I have seen have walked me through the steps where I create 3 .resx files e.g WinFormStrings.resx (English) WinFormStrings.de-DE.resx (German)and WinFormStrings.fr-FR.resx (French). See: http://msdn2.microsoft.com/en-US/library/y99d1cd3.aspx. When I do this the resource manager does not pull out any of the strings I enter in the resource files. Have I missed something but if you click 'Show all files' in the Solution explorer is appears that Visual Studio generates a .resx file for every Form anyway, so why do we need to add in another one for English? Thanks in advance for any help -------------------------------- From: Ryan Cush |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |