Localizable bug
Localizable bug
It is impossible to add new language to application with TChart.
I set Localizable property of the form with TChart to true, but nothing from TChart strings is in the resource file. It is because of such properties as Series.Title, Axes.Left.Title.Caption, Header.Lines and so on haven't LocalizableAttribute. Why?
Thank you in advance,
Alex
I set Localizable property of the form with TChart to true, but nothing from TChart strings is in the resource file. It is because of such properties as Series.Title, Axes.Left.Title.Caption, Header.Lines and so on haven't LocalizableAttribute. Why?
Thank you in advance,
Alex
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi alex,
Have you tried saving the forms choosing the option "Save Form As" and click the downwards arrow button at the right of the "Save" button and choose "Save with Encoding" option. Then you choose the encoding you prefer there?
Have you tried saving the forms choosing the option "Save Form As" and click the downwards arrow button at the right of the "Save" button and choose "Save with Encoding" option. Then you choose the encoding you prefer there?
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Encoding is not a problem.
Problem is: some TChart properties that can be translated haven't Localizable attribute (typed as "[Localizable(true)]"). I think solution is very simple: you must add Localizable attribute for all properties with text and recompile TeeChart project. That's all. After it if Form have Localizable property turned to true, all TChart properties with LocalizableAttribute(true) will be in resource file and can be translated.
Thanks, Alex.
Problem is: some TChart properties that can be translated haven't Localizable attribute (typed as "[Localizable(true)]"). I think solution is very simple: you must add Localizable attribute for all properties with text and recompile TeeChart project. That's all. After it if Form have Localizable property turned to true, all TChart properties with LocalizableAttribute(true) will be in resource file and can be translated.
Thanks, Alex.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi alex,
Ok, to achieve what you request you need to use TeeChart.Languages.dll. There's an example of its usage at TeeChart's features demo, available at TeeChart's program group. The example can be found at All Features\Welcome !\Miscellaneous\Multi-Language.
Ok, to achieve what you request you need to use TeeChart.Languages.dll. There's an example of its usage at TeeChart's features demo, available at TeeChart's program group. The example can be found at All Features\Welcome !\Miscellaneous\Multi-Language.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Dear Narcís!
The assembly TeeChart.Languages.dll contains translations of TeeChart forms and string constants to several languages. But I want to translate my own program into another language. In other words I want to have two languages in my program and switch between them during runtime.
Please try. Create New project with one form Form1. Turn Form1 Localizable property to true, Language property to English. Put TChart tChart1 on the form. Type "English" in Form1.Text, and type "English" in tChart1 Title. Then change Language Form1 property to Spanish. Change Form1.Text and tChart1 title to "Spanish". Then change Language Form1.Property back to English. You will see "English" in Form1.Text, but tChart1 title will be "Spanish" instead of "English". tChart1 title is untranslatable! It is because of Form1.Text property has Localizable attribute, but tchart1 title not!
Thanks, Alex
The assembly TeeChart.Languages.dll contains translations of TeeChart forms and string constants to several languages. But I want to translate my own program into another language. In other words I want to have two languages in my program and switch between them during runtime.
Please try. Create New project with one form Form1. Turn Form1 Localizable property to true, Language property to English. Put TChart tChart1 on the form. Type "English" in Form1.Text, and type "English" in tChart1 Title. Then change Language Form1 property to Spanish. Change Form1.Text and tChart1 title to "Spanish". Then change Language Form1.Property back to English. You will see "English" in Form1.Text, but tChart1 title will be "Spanish" instead of "English". tChart1 title is untranslatable! It is because of Form1.Text property has Localizable attribute, but tchart1 title not!
Thanks, Alex
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hello Alex,
This is not a bug, but a .NET feature which hadn't been implemented in TeeChart.dll.
I have now added "[Localizable(true)]" to the following properties:
Steema.TeeChart.TChart.Header
Steema.TeeChart.TChart.SubHeader
Steema.TeeChart.TChart.SubFooter
Steema.TeeChart.TChart.Footer
Steema.TeeChart.Axis.Title
Steema.TeeChart.Legend.Title
Steema.TeeChart.Styles.Series.Title
Steema.TeeChart.Tools.Annotation.Text
Would you like to see this attribute added to any other TeeChart properties?
This is not a bug, but a .NET feature which hadn't been implemented in TeeChart.dll.
I have now added "[Localizable(true)]" to the following properties:
Steema.TeeChart.TChart.Header
Steema.TeeChart.TChart.SubHeader
Steema.TeeChart.TChart.SubFooter
Steema.TeeChart.TChart.Footer
Steema.TeeChart.Axis.Title
Steema.TeeChart.Legend.Title
Steema.TeeChart.Styles.Series.Title
Steema.TeeChart.Tools.Annotation.Text
Would you like to see this attribute added to any other TeeChart properties?
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Dear Chris and Narcís!
Localization problems with Microsoft Visual Studio 2005
Version 8.0.50727.867 (vsvista.050727-8600)
Microsoft .NET Framework Version 2.0.50727
TChart Version 2.0.2652.22325
With this (Vista) Visual Studio version some TChart properties now doesn't present in resource localizable strings and can't be translated. For example Steema.TeeChart.Axis.Title.Caption property becomes not translatable. The reason is simple: you mark with [Localizable(true)] attribute Steema.TeeChart.Axis.Title property but not Steema.TeeChart.Axis.Title.Caption.
We work with foreign customers and now we can't translate our programs into foreign languages.
Only what is neccesary:
instead of [Localizable(true)] attribute for Steema.TeeChart.Axis.Title mark as [Localizable(true)] AxisTitle.Caption,
instead of Steema.TeeChart.TChart.Header, Steema.TeeChart.TChart.SubHeader and Steema.TeeChart.TChart.Footer mark TextShape.Lines and TextShape.Text
instead of Steema.TeeChart.Legend mark Legend.Lines and (or?) Legend.Text
mark Series.Description, Series.Title
Please your know better what to mark: all text properties visible by user.
It is strange but previous version of Microsoft Visual Studio 2005
(not Vista) puts all need strings into resource. But I think problem is in TChart, not in Visual Studio.
Thanks in advance,
Alex
Localization problems with Microsoft Visual Studio 2005
Version 8.0.50727.867 (vsvista.050727-8600)
Microsoft .NET Framework Version 2.0.50727
TChart Version 2.0.2652.22325
With this (Vista) Visual Studio version some TChart properties now doesn't present in resource localizable strings and can't be translated. For example Steema.TeeChart.Axis.Title.Caption property becomes not translatable. The reason is simple: you mark with [Localizable(true)] attribute Steema.TeeChart.Axis.Title property but not Steema.TeeChart.Axis.Title.Caption.
We work with foreign customers and now we can't translate our programs into foreign languages.
Only what is neccesary:
instead of [Localizable(true)] attribute for Steema.TeeChart.Axis.Title mark as [Localizable(true)] AxisTitle.Caption,
instead of Steema.TeeChart.TChart.Header, Steema.TeeChart.TChart.SubHeader and Steema.TeeChart.TChart.Footer mark TextShape.Lines and TextShape.Text
instead of Steema.TeeChart.Legend mark Legend.Lines and (or?) Legend.Text
mark Series.Description, Series.Title
Please your know better what to mark: all text properties visible by user.
It is strange but previous version of Microsoft Visual Studio 2005
(not Vista) puts all need strings into resource. But I think problem is in TChart, not in Visual Studio.
Thanks in advance,
Alex
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hello Alex,
Would you be so kind as to upload to http://www.steema.net/upload/ a small project we can compile "as-is" on VS2005 under win2003 and on VS2005 under winVista so we can reproduce the problem here?
If the problem was TeeChart's, wouldn't you see it in all versions of Visual Studio 2005?It is strange but previous version of Microsoft Visual Studio 2005
(not Vista) puts all need strings into resource. But I think problem is in TChart, not in Visual Studio.
Would you be so kind as to upload to http://www.steema.net/upload/ a small project we can compile "as-is" on VS2005 under win2003 and on VS2005 under winVista so we can reproduce the problem here?
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Hello, Christopher!
I have uploaded small project Localization.zip on your server.
If you open Form1.resx file you will never see Axis.Title properties such as "Amplitude, mV" and "Stimulus, mA". But if you open Form1 in designer you will see these strings on the form. This situation is only under Microsoft Visual Studio 2005 Version 8.0.50727.867 (vsvista.050727-8600).
If you start under previous Version of Visual Studio (operation system is not important: may be XP or Vista), open Localization project, change something in TChart on Form1 and save changes - you will see all neccesary strings in Form1.resx file.
Regards,
Alex
I have uploaded small project Localization.zip on your server.
If you open Form1.resx file you will never see Axis.Title properties such as "Amplitude, mV" and "Stimulus, mA". But if you open Form1 in designer you will see these strings on the form. This situation is only under Microsoft Visual Studio 2005 Version 8.0.50727.867 (vsvista.050727-8600).
If you start under previous Version of Visual Studio (operation system is not important: may be XP or Vista), open Localization project, change something in TChart on Form1 and save changes - you will see all neccesary strings in Form1.resx file.
Regards,
Alex
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hello Alex,
Yes, I can see what you mean. Using the latest teechart.net v2 release under windows server 2003 enterprise edition version 5.2 (build 3790.srv03_sp1_gdr.070304-2232) and visual studio .net version 8.0.50727.42 (RTM.050727-420), the Form1.Designer.cs looks like this:
and my Form1.ar.resx looks like this:
Using the latest teechart.net v2 release under windows vista ultimate version 6.0 (build 6000) and visual studio .net version 8.0.50727.859 (vsvista.050727-8500), the Form1.Designer.cs looks like this:
and my Form1.ar.resx has no teechart related data in it.
<rant>I find this incredible. The versions of teechart are *identical* and so should produce *identical* results using the .net framework independent of the operating system on which it is run. Wasn't this one of the objectives of the .net framework?</rant>
Anyhow, please note that although I am setting the Header.Text property in the code (which is marked as localizable) but what is being saved in the resx file is the Lines property, which is not marked as localizable. If I do what you suggest and mark the Lines property as localizable as well, then visual studio .net 2005 simply closes down (crashes), both under vista and win2003.
So, I'm afraid to say that I am temporarily at a loss as to how to resolve this issue. I'm going to have a good look around the internet and if I can't find anything on the subject then I'll have to contact Microsoft directly.
Yes, I can see what you mean. Using the latest teechart.net v2 release under windows server 2003 enterprise edition version 5.2 (build 3790.srv03_sp1_gdr.070304-2232) and visual studio .net version 8.0.50727.42 (RTM.050727-420), the Form1.Designer.cs looks like this:
Code: Select all
this.tChart1.Header.Lines = ((string[])(resources.GetObject("tChart1.Header.Lines")));
Code: Select all
<data name="tChart1.Header.Lines" mimetype="application/x-microsoft.net.object.binary.base64">
<value>AAEAAAD/////AQAAAAAAAAARAQAAAAEAAAAGAgAAAAZhcmFiaWML</value>
</data>
Code: Select all
this.tChart1.Header.Lines = new string[] {
"arabic"};
<rant>I find this incredible. The versions of teechart are *identical* and so should produce *identical* results using the .net framework independent of the operating system on which it is run. Wasn't this one of the objectives of the .net framework?</rant>
Anyhow, please note that although I am setting the Header.Text property in the code (which is marked as localizable) but what is being saved in the resx file is the Lines property, which is not marked as localizable. If I do what you suggest and mark the Lines property as localizable as well, then visual studio .net 2005 simply closes down (crashes), both under vista and win2003.
So, I'm afraid to say that I am temporarily at a loss as to how to resolve this issue. I'm going to have a good look around the internet and if I can't find anything on the subject then I'll have to contact Microsoft directly.
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/