Free Support Forum - aspose.com

Translate xlsx file into multiple languages in Java

Hi,

I’m working on generating translated xlsx files. While we can pass translated strings into xlsx, some strings generated are not translated into other languages.

Examples like: Total, Grand Total(they are generated by pivotTable.setRowGrand(true)), Row Labels

Is there a way to translate them based on some parameters (like locale or language)?

I find that there is a function called

setLocale(java.util.Localevalue)

But the instruction tells:
Gets or sets the Locale used by this workbook. MS Excel will always
display a file in accordance with the machine’s locale settings, no
matter what the locale/region has been set (in your code).

So I’m just wondering is there a way to translate those strings or excel will only handle it based on the locale setting of the machine which opens it?

Hi Jianye,


Thank you for contacting Aspose support.

I think your requirement cannot be achieved using the Aspose.Cells APIs because the predefined contents such as Grand Total, Sub Total, Row Label and so on are automatically translated by the MS Excel application depending upon the system location and/or Excel’s installation language. Anyway, we have logged an investigative ticket in our database to look further into this matter. The ticket Id for your future reference is CELLSJAVA-41130. Please spare us little time to properly investigate the scenario on our end. In the meanwhile, we will keep you posted with updates in this regard.

Hi,


Thanks for your posting and using Aspose.Cells.

We have fixed this issue. Please download and use the latest version of Aspose.Cells for Java.

Please implement the GlobalizationSettings class to fulfill your needs.

Here is an article link for your reference.


The issues you have found earlier (filed as CELLSJAVA-41130) have been fixed in Aspose.Cells for Java 17.5.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.