Hi,
We have developed multi language application with Teechart for create different type of charts. We need to display X-axis value in the format of month like 10 May, 12 May, etc. When we change the language from English to other language the X-axis month name is not translated to selected language.
Does Teechart support multi languages for X-axis date time display?
X - Axis Date & Time value display in multi language
Re: X - Axis Date & Time value display in multi language
Hello,
TeeChart uses DateTimeToString function to convert the TDateTime values to strings. Since this takes the ShortMonthNames array for the months ('mmm'), you can modify that array using the language you wish. Ie:
TeeChart uses DateTimeToString function to convert the TDateTime values to strings. Since this takes the ShortMonthNames array for the months ('mmm'), you can modify that array using the language you wish. Ie:
Code: Select all
ShortMonthNames[1] := 'Jan';
ShortMonthNames[2] := 'Feb';
ShortMonthNames[3] := 'Mar';
ShortMonthNames[4] := 'Apr';
ShortMonthNames[5] := 'May';
ShortMonthNames[6] := 'Jun';
ShortMonthNames[7] := 'Jul';
ShortMonthNames[8] := 'Aug';
ShortMonthNames[9] := 'Sep';
ShortMonthNames[10] := 'Oct';
ShortMonthNames[11] := 'Nov';
ShortMonthNames[12] := 'Dec';
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: X - Axis Date & Time value display in multi language
Hello,
Thank you for your reply.I think DateTimeTostring() and given solution in the above post is for Delphi Programming.But I am using Html5 & Javascript to create chart in the application, so how can we achieve the same in the Javascript language?
Thank you for your reply.I think DateTimeTostring() and given solution in the above post is for Delphi Programming.But I am using Html5 & Javascript to create chart in the application, so how can we achieve the same in the Javascript language?
Re: X - Axis Date & Time value display in multi language
Oups , let me check it for Javascript.SenSeo wrote:Thank you for your reply.I think DateTimeTostring() and given solution in the above post is for Delphi Programming.But I am using Html5 & Javascript to create chart in the application, so how can we achieve the same in the Javascript language?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: X - Axis Date & Time value display in multi language
Hi,
In Javascript you can change the dateFormat.i18n monthNames array:
In Javascript you can change the dateFormat.i18n monthNames array:
Code: Select all
dateFormat.i18n = {
dayNames: [
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
],
monthNames: [
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
]
};
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |