When our customers use Arabic language in Docentric templates, there are a couple of points worth knowing so potential layout issues can be prevented.
Italic formatting
Regardless of the Unicode character set used for Arabic, when you apply Italic formatting, the output in Docentric designer Live preview, PDF Preview, and PDF printed with D365FO will contain either boxes instead of Glyphs or it will be returned empty.
Hijri date
By default in Docentric templates, language (either during Design time or Runtime) determines the language culture which conditions the number and date formatting. For example, the same number: 10000 will be formatted differently in regard to the applied language:
en-us: 10,000.00
fr: 10 000,00
nl: 10.000,00
This means that the date 12/18/2024 when the Arabic language (and thus the language culture) is selected either as Preview language or as runtime language show as 06/17/1446 which corresponds to Hijri date. When you want to show the date or number in different language culture, you can use format() function in XPath to format it to use Gregorian calendar:
06/17/1446 => format(SalesConfirmHeader/@ConfirmDate, 'd', 'en-us') => 12/18/2024
For more details about this and other functions see XPath Functions - Docentric AX
Broken text
There are three Unicode character sets for Arabic:
- 0x0600-0x06FF 1536-1791 Arabic (standard Arabic, standard Arabic keyboard)
- 0xFB50-0xFDFF 64336-65023 Arabic Presentation Forms-A (Persian Arabic)
- 0xFE70-0xFEFE 65136-65278 Arabic Presentation Forms-B (Old Arabic, not used in modern texts and not on standard Arabic keyboard)
The Arabic presentation forms exist because they were needed for compatibility with older standards long ago.
Docentric Word document generation works correctly for Arabic Unicode character set but not for Arabic Presentation Forms-A and Arabic Presentation Forms-B Unicode character sets.
When PDF generation is concerned with Live preview, PDF Preview in Docentric designer and generating PDF from D365FO, the Arabic text is incorrectly shown in LTR (Left-To-Right) mode for all character sets:
For preview purposes during Design-time, we recommend using Word preview to be able to view the correct RTL mode with character connections.
For printing from D365FO on Tier 2+ environments, you can call Office conversion services to generate Arabic text in PDF correctly.
Bidirectional text
When combining RTL (Right-To-Left) with LTR (Left-To-Right) in the same text, certain standard behaviour is observed which is referred to as Bidirectional text. According to Microsoft documentation, the actual text that is presented is never reversed or “mirrored”, meaning that English text is always read LTR while Arabic text is always read RTL. This means that in the following example, the text written in English follows its LTR direction while the text in the same sentence written in Arabic is written in RTL:
You can read more in the referenced Microsoft documentation: Right-to-left language support and bidirectional text - Finance & Operations | Dynamics 365 | Microsoft Learn
Conclusion
Arabic text is natively supported with Docentric templates when generating MS Word documents as output, provided standard Arabic Unicode character set is used. For PDF documents, when printing Docentric templates on Tier 2+ environments, Office Conversion Services need to be called to generate the Arabic text correctly. Bidirectional text in Docentric templates is also handled as per Microsoft standard with each language using its designated heading.