Most of the applications that are developed today throughout the world are created as Bidi-unaware applications (with the exception of applications developed in the countries where the native language is Arabic or Hebrew). Such applications can be made bidi-aware by adding calls to the PM bidi support APIs and by adding code that is aware of bidirectional text and knows how to manage it.
The PM bidirectional support provides the following types of services/mechanisms to assist the conversion process of an application to be bidi-aware.
Support for bidirectional text presentation is available. This support is sensitive to the contents of the BIDIATTR environment variable. When this variable is set, the text output functions do some extra processing to the text being output. This support provides very basic bidirectional support for the benefit of bidi-unaware applications. For applications that use text in a very simple way (i.e they do not have any sophisticated text handling features), enabling this support (by initializing the BIDIATTR environment variable) may be enough. For this basic support, the application code does not need be changed at all. The fact that the unaware application runs in a bidi-supporting environment (denoted by the BIDIATTR variable) is enough to trigger the system-provided bidirectional text handling and thus gain some level of automatic support for such applications.
In most cases, however, some additional support will be needed. In these cases, some changes must be made to the application in order to allow it to support bidi text.
This support allows typing of characters in both English and Hebrew/Arabic, as well as support for language-specific hotkeys. This is the basic means that allows the user to input national language text from the keyboard.
PM applications make extensive use of system services called PM Controls. These services provide support for many routine tasks such as text entry, menu management, selections from a list of options and scrolling.
With the PM Bidirectional support, all PM controls are bidi-aware services. Applications can make use of these bidi-aware services by marking them as bidi-aware and specifying their bidirectional attributes. This way, an application can be made aware (up to a certain extent) just by marking its PM resources as Bidi resources. In many cases, this process involves only changes in resource files (.RC) rather than changing source (and executional) code.
The third level of support is available only for applications that incorporate in their code explicit calls to the various PM Bidirectional APIs, such as calls for text conversions, keyboard input support, justification etc.