Formula Field OR in IF Condition does not work with Different Locales using .NET | TextInfo.ListSeparator

I am using Aspose.Words for .net Version 19.12 and using Mail Merge Functionality.

I have one IF Condition having OR operator in template. This IF condition is not working as expected with different locales. For example, with French or German its not working but with English its working as expected.

I have attached here sample application to dupe this issue.

POC-IFConditionLocaleIssue.zip (5.0 MB)

I have also verified that this issue exists with current latest version also.

@Rakesh2013

We have tested the scenario and managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-22494. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@Rakesh2013

It is to inform you that the issue which you are facing is actually not a bug in Aspose.Words. So, we have closed this issue (WORDSNET-22494) as ‘Not a Bug’.

Please use TextInfo.ListSeparator property as shown below to get the desired output.

string culture = "fr-FR";
Thread.CurrentThread.CurrentCulture = new CultureInfo(culture);
Thread.CurrentThread.CurrentCulture.TextInfo.ListSeparator = ","; 
Document document = new Document(MyDir + "TestIFORCondition.docx");
document.MailMerge.Execute(
    new string[] { "UnitPrice", "InclusiveUnitPrice", "IsInclusive", "IsAdminIncluded", "IsGratuityIncluded" },
    new object[] { 100, 120.45, false, true, true });
document.Save(MyDir + "21.7.docx");

thanks for the awesome information.

Thank you Tahir for this solution. It is working.
Can I get more details on how Aspose is using “TextInfo.ListSeparator” property. I just want to make sure that if I use this property then it should not break any other Localization/Globalization functionality that we use.

@Rakesh2013

You can use FieldOptions.FieldUpdateCultureSource property to specify what culture to use to format the field result. The FieldUpdateCultureSource is either CurrentThread or FieldCode. By default, it is CurrentThread.

You need to use .NET APIs to set the current thread properties e.g. use TextInfo.ListSeparator property to set the list separator. The list separator is comma (,) for French culture. Please set this property according to your desired culture.

thanks for the awesome information.