Page 1 of 1

Localizable bug

Posted: Mon Apr 24, 2006 6:04 am
by 9088042
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

Posted: Mon Apr 24, 2006 9:24 am
by narcis
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?

Posted: Mon Apr 24, 2006 12:36 pm
by 9088042
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.

Posted: Mon Apr 24, 2006 1:16 pm
by narcis
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.

Posted: Mon Apr 24, 2006 2:02 pm
by 9088042
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

Posted: Tue Apr 25, 2006 9:17 am
by 9088042
Dear Narcís!

You want to make new TeeChart version this week. But what about this bug? It is very serious but very simple to fix: only add "[Localizable(true)]" strings to few TChart properties.

Thanks, Alex

Posted: Tue Apr 25, 2006 12:18 pm
by Chris
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?

Posted: Wed Apr 26, 2006 7:23 am
by 9088042
Dear Chris!

Thank you very much!

I need only text properties that can be visible by user. I think you know better all these properties.

Best regards,
Alex

Posted: Thu Jul 12, 2007 1:11 pm
by 9638041
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

Posted: Fri Jul 13, 2007 7:16 am
by Chris
Hello Alex,
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.
If the problem was TeeChart's, wouldn't you see it in all versions of Visual Studio 2005?

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?

Posted: Tue Jul 17, 2007 5:56 am
by 9638041
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

Posted: Thu Jul 19, 2007 10:26 am
by Chris
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:

Code: Select all

this.tChart1.Header.Lines = ((string[])(resources.GetObject("tChart1.Header.Lines")));
and my Form1.ar.resx looks like this:

Code: Select all

  <data name="tChart1.Header.Lines" mimetype="application/x-microsoft.net.object.binary.base64">
    <value>AAEAAAD/////AQAAAAAAAAARAQAAAAEAAAAGAgAAAAZhcmFiaWML</value>
  </data>
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:

Code: Select all

			this.tChart1.Header.Lines = new string[] {
        "arabic"};
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.