Hi,
If I generate a Word object with one paragraph with one run of text - lets say: " this is english text." and open the generated Word document and put the cursor inside the run the Word application will display on the lower left corned as the language of the text Hebrew even if the text doesn’t contain any Hebrew characters.
The code to reproduce is:
var doc1 = new Document();
var paragraph = new Paragraph(doc1);
paragraph.ParagraphFormat.Bidi = true;
paragraph.ParagraphFormat.Alignment = ParagraphAlignment.Right;
var run = new Run(doc1) { Text = " this is english text." };
run.Font.Bidi = true;
paragraph.Runs.Add(run);
doc1.Save(@“C:\Document.docx”, SaveFormat.Docx);
Is there any way to make Word display the correct language.
Regards,
Lucian Nistor,
Senior .Net Developer,
IBM Romania
Hi Lucian,
Hi,
We are currently using Aspose.Words version 14.5.0.0 but we still encountering this issue just a bit different: the displayed language is Arabic (Saudi Arabia). I’m updating the code used to reproduce this issue (the previous one was missing the line for adding the paragraph to document):
var doc1 = new Document();
var paragraph = new Paragraph(doc1);
paragraph.ParagraphFormat.Bidi = true;
paragraph.ParagraphFormat.Alignment = ParagraphAlignment.Right;
var run = new Run(doc1) { Text = " this is english text." };
run.Font.Bidi = true;
paragraph.Runs.Add(run);
doc1.Sections[0].Body.Paragraphs.Add(paragraph);
doc1.Save(@“C:\Document.docx”, SaveFormat.Docx);
Could you please double-check and re-open this case ?
Thank you,
Aurelian Iordache
Software Developer
IBM Romania
Hi Aurelian,