Hello
I have word document written in Italian with some fields using a CardText function.
I use Aspose to replace field and export document to PDF.
Because document is in Italian, I want CardText to print some numbers in Italian but it prints in English.
I changed my code to add language supporting, but when I set French, German, Spanish, CardText convert the numbers in the correct language. But when I set language as Italian or some others languages, the result of numbers is in English.
Have I miss something? Do we have something to configure to make aspose supporting Italian or other non-supporting language?
This is my code below. I need help please.
var templateInputStream = getClass().getResourceAsStream("/templates/input.docx");
LoadOptions loadOptions = new LoadOptions();
loadOptions.getLanguagePreferences().addEditingLanguage(EditingLanguage.ITALIAN_ITALY);
loadOptions.getLanguagePreferences().setDefaultEditingLanguage(EditingLanguage.ITALIAN_ITALY);
final var template = new Document(templateInputStream, loadOptions);
template.getFieldOptions().setFieldUpdateCultureSource(FieldUpdateCultureSource.FIELD_CODE);
for (Field field : template.getRange().getFields())
{
System.out.println(field.getFieldCode() + " " + field.getType() + " " + field.getLocaleId());
field.setLocaleId(EditingLanguage.ITALIAN_ITALY);
}
template.save("output.pdf", SaveFormat.PDF);