Using ChartGlobalizationSettings Class to Set a Different Language for Chart Component with Golang via C++
Possible Usage Scenarios
Aspose.Cells APIs have exposed the ChartGlobalizationSettings class in order to deal with scenarios where the user wishes to set chart components to different languages and provide custom labels for subtotals in a spreadsheet.
Introduction to ChartGlobalizationSettings Class
The ChartGlobalizationSettings class currently offers the following 8 methods which can be overridden in a custom class to translate items such as AxisTitle, AxisUnit, ChartTitle, and so on into different languages.
- GetAxisTitleName: Gets the name of the title for an axis.
- GetAxisUnitName: Gets the name of the axis unit.
- GetChartTitleName: Gets the name of the chart title.
- GetLegendDecreaseName: Gets the name of “Decrease” for the legend.
- GetLegendIncreaseName: Gets the name of “Increase” for the legend.
- GetLegendTotalName: Gets the name of “Total” for the legend.
- GetOtherName: Gets the name of the “Other” label for the chart.
- GetSeriesName: Gets the name of a series in the chart.
Custom language translation
Here, we will create a waterfall chart based on the following data. The names of chart components will be displayed in English in the chart. We will use a Turkish language example to show how to display the Chart Title, Legend Increase/Decrease names, Total name, and Axis Title in Turkish.

Sample Code
The following sample code loads the sample Excel file.
Output generated by the sample code
This is the console output of the above sample code.
Workbook chart title: Grafik Başlığı
Workbook chart legend: Artış
Workbook chart legend: Düşüş
Workbook chart legend: Toplam
Workbook category axis title: Eksen Başlığı