Bidirectional application support

This chapter explains how to use the functions provided by HATS for developing applications in bidirectional languages. Generally its contents apply to both Hebrew and Arabic application developers. The functions that are specific to Arabic users are described separately.

HATS provides these functions to support bidirectional languages:

This chapter explains all these features.

Note:
There is no bidirectional support for Dojo transformations and Light pen (attention) and Light pen (selection) host components.

Software environment

Following are requirements for bidirectional application support:

Working with the host terminal

The HATS host terminal allows Host On-Demand bidirectional-specific keystrokes, therefore you can perform the following bidirectional functions. The following host function keys are available for both 3270, 5250 and VT sessions:

Ctrl+L: Latin Layer
This key combination changes the language layer to Latin and the operator information area (OIA) is updated to show English Language.
Ctrl+N: Bi-di Layer
This key combination changes the language layer to bidirectional and the OIA is updated to show the bidirectional language.
Ctrl+S: Screen reverse
If the screen orientation is left-to-right, this key combination changes the screen image to right-to-left and the language layer changes to bidi. If the screen orientation is right-to-left, this key combination reverses the screen image to left-to-right and the language changes to Latin. This is not available in VT visual sessions.
Ctrl+F: Field reverse
If the field orientation is left-to-right, this key combination changes the field orientation to right-to-left, the cursor moves to the other side of the field, and the language layer becomes bidirectional. If the field orientation is right-to-left, this key combination changes the field orientation to left-to-right, the cursor moves to the other side of the field, and the language layer becomes Latin. This is for 5250 sessions only.

The following host function keys are available only for 3270 sessions:

Ctrl+P: Push
You can enter and edit text in the opposite direction from the field direction.
Ctrl+O: End Push
Push mode is ended and the cursor moves to the end of the push segment.
Ctrl+A: Auto Push
You can type mixed left-to-right and right-to-left text by changing the language layer.

The following host function key is available only for 5250 sessions:

Ctrl+C: Close
The data entered in one keystroke direction (either left-to-right or right-to-left) is concatenated with the data that was previously entered in the opposite direction. The cursor direction is set to be the same as the field direction, and the language layer is set to the default for the field direction. If the screen orientation is currently left-to-right, the cursor is positioned at the first null to the right of the concatenated text. If the screen orientation is currently right-to-left, the cursor is positioned at the first null to the left of the concatenated text.

The following host function keys are available only for Arabic VT sessions:

Ctrl+K: Column heading
Column heading mode causes blanks between columns of text to break insertions allowing the English titles to columns of data to maintain their correct position.

The following host function keys are available only for Hebrew VT sessions:

Ctrl+D : Cursor direction
If the current cursor direction is left-to-right, pressing Ctrl+D changes it to right-to-left, and back again. This function is allowed for visual text type only. When the cursor direction is set to right-to-left, this does not affect cursor addressing and moving, insert and delete characters, erase in line or erase in display. The following functions are affected by right-to-left cursor direction settings:
Ctrl+D : Character set modes
This function switches between 7-bit and 8-bit character sets. If the current character set is DEC Hebrew (8-bit) or ISO Hebrew Supplemental (8-bit), pressing Ctrl+B changes the current character set to Hebrew NRCS (7-bit). If the current character set is Hebrew NRCS (7-bit), pressing Ctrl+B loads one of two 8-bit character sets based on the following rule:

Host terminal limitations

There is no support for Unicode fields in the Host Terminal; therefore, switching languages in Unicode fields is not possible.

Complex text, containing both bidirectional text and numbers, should not be used as screen recognition criteria.

Capturing screens

In bidirectional sessions, screens can be captured either as left-to-right screens or as right-to-left screens. Captured screens are displayed exactly as they were captured. To capture a screen as a right-to-left screen, press Ctrl+S (Screen reverse) in a left-to-right screen and click Create Screen Capture.

Recognizing bidirectional host components

Typically the orientation of a host component is the same as the screen orientation. However, in some cases, the orientation of a host component is the opposite of the general orientation of the screen. When a HATS project uses a bidirectional code page, a check box labeled Recognize component oriented opposite to screen is added to the Insert Host Component wizard and the Create a Screen Combination wizard. When you add a host component to a transformation, select this box if the host component's orientation is the opposite of the screen orientation. Selecting the box enables HATS to recognize command prompts, function keys, selection lists, subfile, and input fields with hints whose orientation is the opposite of the screen orientation.

Mixed bidirectional text may be used in function key and selection list settings. This means that strings like: BIDI1 = BIDI2, where BIDI1 and BIDI2 are segments of bidirectional text, may be recognized as function keys and selection lists .

By default, only left-to-right components may be recognized in default rendering of screens (as in an English session). However, selection of the Recognize component oriented opposite to screen property in the Project Settings editor, on the Rendering tab in the Default Rendering section will enable recognition of both left-to-right and right-to-left components in default rendering.

Also by default, components on a screen transformation are recognized only according to the screen orientation. At the project level you can specify that if a component is not recognized, HATS should try to recognize it using the opposite screen orientation. To make this specification, in the Project editor on the Rendering tab in the Advanced section under Default Rendering, select the Recognize component oriented opposite to screen check box. If this selection is made and the component is still not recognized, then rendering will follow the specification made with the setting, Use default rendering on component rendering failure.

You can also specify this setting at the component level. To do so, when you add a component to a transformation using the Insert Host Component wizard, on the Rendering Options panel, click the Advanced settings for rendering button, and select the Recognize component oriented opposite to screen box. The value of this setting at the component level is not inherited from the project setting. The following table shows the possible combinations of this setting at the project and component levels and which setting is used. For more general information see Advanced rendering.

Table 16. Project and component setting combinations
Project setting Component setting Setting used
cleared cleared component
cleared selected component
selected cleared project
selected selected component

Controlling the orientation of widgets

There are two special check boxes that provide you control over widget presentation when your application runs in the WebSphere® Application Server. This control applies to:

These two check boxes are:

On a left-to-right screen, when the Reverse widget's orientation check box is selected, the GUI image is changed to be right-to-left. Similarly, when the Reverse text in widget check box is selected, the text within the GUI image is changed to right-to-left.

For example, suppose you have the left-to-right screen that contains the following text (upper case letters are bidirectional data and lower case letters remain as English data):

BIDI TEXT

pf01=help

When you customize this screen as RTL. it is displayed as:

TXET IDIB

pleh=10fp

From the user's point of view, everything is correct except the function key. The function key is recognized, but it is displayed backwards.

For the customized screen to appear correctly, you must select both the Reverse widget's orientation and the Reverse text in widget check boxes when inserting the function key host component into a customized screen.

When you do this, the screen is displayed as:

TXET IDIB

pf01=help

When you replace a text input field with a drop-down list in a bidirectional project, the captions of the drop-down list items are not affected by the screen orientation . The captions will always appear in visual LTR format, unless you select the Reverse text in widget check box for the widget. In that case the captions will be appear in visual RTL format.

Also, when creating bidirectional HATS applications, and copying and pasting multiple lines of text from a protected field into a visual input field, the text may be reversed. If you copy and paste one line at a time, the orientation will be preserved.

Controlling the alignment of widgets

To assign the proper alignment of widgets containing HATS component elements, a Component Alignment setting is available on the following HATS configuration panels:

In addition, to assign the proper alignment of individual widgets, Field Alignment and Table Alignment settings are available in the widget settings dialog of the Rendering Options wizard for the Field and Table widgets.

The values of these settings are left and right. The Component Alignment setting in the project settings affects the alignment of all widgets in the project. The value set in the project settings becomes the default for the Create a Transformation and Create a Screen Customization wizards. The alignment specified for an individual widget overrides the value specified for default rendering.

Customized components and widgets bidirectional support

Bidirectional counterparts should be used when customizing new components and widgets, for example in Web projects:

import com.ibm.hats.transform.widgets.BIDI.LabelWidgetBIDI

public class newBIDILabel extends LabelWidgetBIDI implements HTMLRenderer

Global variables

When global variables are extracted, the extracted data is exactly the data that appears on the screen, including the orientation of the current screen. Any global variables inserted onto a screen as an action of a screen event are inserted according to the screen orientation.

In both Web and rich client applications, bidirectional data from static text and input fields is stored in global variables in visual format, in both the Rational® SDP and runtime environments.

When you use the Insert Global Variable wizard to insert a global variable value as static text into a transformation for a bidirectional screen, you have the option to Insert global variable in visual format. Select this option to insert the global variable value as static text in visual format. Clear this option to insert the value as static text in logical format.

When global variables are extracted from logical VT sessions, the extracted data is converted to visual format. Any global variables inserted onto a VT logical sessions, are converted to logical format. Text direction is set according to screen orientation.

Text replacement

When you use text replacement in bidirectional sessions on a project level or HATS component tag level, there are three additional check boxes you can use:

Match on LTR screen
This option allows text replacement to be performed correctly for text on a left-to-right display screen.
Match on RTL screen
This option allows text replacement to be performed correctly for text on a right-to-left display screen.
Match with screen reverse
If you select this box and the Match on LTR screen check box, the reversed string would match in a right-to-left screen. When the Screen reverse button is clicked on a left-to-right screen, the data is consistent.

If you select this box and the Match on RTL screens check box, the reversed string would match in a left-to-right screen. When the Screen reverse button is clicked on a right-to-left screen, data is consistent.

You must select either Match on LTR screen or Match on RTL screens.

For example, suppose a left-to-right host screen contains the text: NO on. If you define text replacement to replace no with yes and ignore the case, the results depend on the boxes you selected, as follows:

Table 17. Bidirectional text replacement options and results
Options selected LTR screen RTL screen
Match LTR screen only yes on no ON
Match RTL screen only NO on yes ON
Match LTR screen and RTL screen yes on yes ON
Match LTR screen and match screen reverse yes on no sey
Match RTL screen and match screen reverse NO sey yes ON
Match LTR and RTL screen and match screen reverse yes sey yes sey

Global rules

When you use either project-level or screen-level global rules in bidirectional sessions, there are three additional check boxes you can use (similar to text replacement):

Match on LTR screens
This option allows the configured global rule to be performed correctly for text on a left-to-right display screen.
Match on RTL screens
This option allows the configured global rule to be performed correctly for text on a right-to-left display screen.
Match with screen reverse
If you select this box and the Match on LTR screen check box, the reversed string would match in a right-to-left screen. When the Screen reverse button is clicked on a left-to-right screen, the data is consistent.

If you select this box and the Match on RTL screens check box, the reversed string would match in a left-to-right screen. When the Screen reverse button is clicked on a right-to-left screen, the data is consistent.

For more information, see Table 17.

Enabling the user to reverse the screen direction

In the application keypad settings you can provide a Screen reverse button on bidirectional transformations for the convenience of your users. The button appears on the application keypad (for Web applications) and on the Transformation view toolbar (for rich client applications). Clicking the button toggles the screen orientation--the operation performed on host systems by pressing the Alt+Enter keys.

At the project level you can include the Screen reverse button in the Application keypad section of the Rendering tab in the Project editor. At the transformation level you can include the Screen reverse button using the Insert Application Keypad functions in the transformation editor.

When you create a new HATS project and select a bidirectional code page, two additional check boxes appear on the Connection Setting panel: Enable screen reverse for non-customized screens and Enable screen reverse for customized screens. These check boxes determine whether the Screen reverse button you provide appears on these screens. By default, both boxes are selected. If you select the first box, the second box is enabled. There is no way to select only the second box.

A non-customized screen is one that is not matched by any screen customization. A non-customized screen, when viewed by the user, has the same screen orientation as the previous screen. If the first screen is non-customized, its screen orientation is left-to-right. If the screen orientation is changed on a previous screen, it is inherited by the next non-customized screen and reset by the next customized screen.

The initial screen orientation of customized screens is the same as it was when the screens were customized. For both customized and non-customized screens, clicking the Screen reverse button changes the screen orientation. During screen recognition, a reversed screen is considered different from the same screen before the screen has been reversed. Therefore, the Screen reverse button can cause a screen not to be recognized. If the developer is confident that all host components that appear on a customized screen are oriented properly, there is no need to enable the Screen reverse button for that screen. It is advisable to disable the Screen reverse button for customized screens.

Enabling the Screen reverse button to the user of an Arabic application will enable another check box to control shaping orientation. For more information see: Functions for Arabic code pages

VT bidirectional display options

For VT bidirectional sessions, some specific bidirectional properties need to be set to the terminal to work correctly for bidirectional users. A VT BIDI display options button which appears in the Connection Settings panel is added to access these options:

Text type (Hebrew)
Determines the format of the text characters stored. Select Visual or Logical. The default is Visual.
Cursor direction (Hebrew Visual)
Sets the cursor direction left-to-right (LTR) or right-to-left (RTL). When cursor direction is set RTL, all characters are displayed in the RTL direction because the cursor moves left by default after each displayed character. In general, only applications that are designed to receive input in a RTL direction will work properly when the Cursor Direction is set to RTL. The default is LTR.
Smart Ordering (Arabic/Hebrew Logical)
Determines whether segments of characters with different text attributes are ordered separately. The default is Off.
Show Text Attributes (Arabic/Hebrew Logical)
Enabled only when Smart Ordering is On. The default is Yes.

Macro prompt and extract bidirectional options

When editing a macro prompt (or extract) in the Visual Macro Editor or the host terminal, you can define the host screen orientation to use for the prompt (or extract) during macro playback at runtime. Options are Inherit from host screen capture, LTR, and RTL. Selecting Inherit from host screen capture uses the same screen orientation value defined for the host screen associated with the macro prompt (or extract). If no host screen is associated, this option is not available, and you must specify either LTR or RTL.

If a pre-HATS V8.0 macro is copied into a HATS V9.5 project, or if a pre-HATS V8.0 project is migrated to HATS V9.5, then if a host screen is associated with the macro prompt (or extract), the Inherit from host screen capture option is used. Otherwise, the default value of LTR is used.

For Hebrew VT bidirectional logical sessions, there are two cursor direction radio buttons (Left to right and Right to left) which provide control over input control orientation for prompt action while recording a macro. In the editor for the VT connection, click BIDI display options to display the radio buttons.

The default input control orientation is the LTR direction which implies that the prompt value is in LTR implicit format.

Macro SQL query bidirectional options

In the SQL wizard for bidirectional languages (Arabic and Hebrew), specific bidirectional properties need to be set. You can access these settings by clicking the Advanced button in the Advanced Macro editor panel. This panel is visible only if your workstation is configured for a bidirectional language. The following settings are available:

Host-File Type
This option specifies whether the Host file should be saved in logical or visual format. The default is Visual. (This option is not enabled for the JDBC driver from the AS/400 Toolbox for Java™).
Local-File Type
This option specifies whether local files are in logical or visual format. The default is Logical.
Host-File Orientation
Specifies whether the Host file should be saved in left-to-right or right-to-left format. The default is Left-to-Right. (This option is not enabled for the JDBC driver from the AS/400 Toolbox for Java.)
Local-File Orientation
Specifies whether local files are in left-to-right or right-to-left format. The default is Left-to-Right.
Lam-Alef Expansion
Specifies the behavior of the Lam-Alef characters. When receiving Arabic data from the host through the SQL Wizard statement, the character Lam-Alef is expanded into two characters, Lam followed by Alef if there is space after Lam-Alef character.
Lam-Alef Compression
Specifies the behavior of the Lam-Alef characters. When sending Arabic data to the host through the SQL wizard statement, the characters Lam followed by Alef are compressed into one character and space is added after Lam-Alef character. This option is enabled for Arabic systems only. The default is on. (This option is not enabled for the JDBC driver from the AS/400 Toolbox for Java.).
Symmetric Swapping
Specifies the behavior of the symmetric characters such as brackets; the inversion of the screen causes directional characters to be replaced by their counterparts. The default is on. (This option is not enabled for the JDBC driver from the AS/400 Toolbox for Java).
Round Trip
Controls how bidirectional text mixed with numerals is processed.
Numerals Shape
Specifies the shape of the numeral on Host file at SQL wizard statement; the numeral shape can be (NOMINAL, NATIONAL and CONTEXTUAL). This option is enabled for Arabic systems only. The default is NOMINAL. (This option is not enabled for the JDBC driver from the AS/400 Toolbox for Java).

Right-To-Left printing support

Bidirectional files can be either RTL or LTR files and in order to print correct RTL data, you must select the Enable RTL Printing check box which appears on the Printing tab of the Connection editor for the bidirectional 3270E default connection. Both PDF and non-PDF files are supported.

This check box is enabled if printing is enabled.

In the case of Arabic applications, enabling RTL printing enables the following two check boxes.

BMS map support

Bidirectional support for BMS maps includes:

  1. Bidirectional code pages: When importing BMS map sets to bidirectional projects, The following code pages should be used:
  2. Bidirectional attributes: When importing a BMS map set into a bidirectional project, a BIDI Options button, is provided. Click this button to set the following BIDI attributes:

Integration Object support

Integration Object support includes extending the Integration Object bean with bidirectional-specific properties that allow such things as reordering extracted text. For more information see the chapter, Using the HATS bidirectional API, in the HATS Web Application Programmer's Guide.

Support for Integration Object Web pages (Model 1 and JSF) includes the correct reordering of extracted/inserted data in runtime and full control by the application developer over screen and extraction/insertion controls orientation using a high level GUI.

Support includes the following capabilities:

Note:
The alignment of bidirectional text in tables may not render correctly when working with JSF Web pages. This is a limitation of the JSF design.

Support of bottom-up Web services

In addition to supporting Model 1 and JSF Web pages generated from Integration Objects, HATS provides bidirectional support for bottom-up traditional (WSDL-based) Web services generated from Integration Objects. In this case, the Web service inherits all of the bidirectional functionality of the Integration Object. The Web service is extended by properties that allow such things as reordering extracted text. These properties can be tested using tools such as sample JSP pages and the Web services explorer. For more information see the chapters, Creating traditional (WSDL-based) Web services and Using the HATS bidirectional API, in the HATS Web Application Programmer's Guide.

Because sample JSP pages generated by the HATS Toolkit are logical LTR applications, they display the results of the Web service properly only if you set to invoke prompt and extract reordering, and set RTL reordering in both cases to False. Otherwise, the result will display incorrectly. However, you may want to see the "incorrect" result to verify how changes of the properties' values affect the Web service.

If you need to see correct results for extract reordering other than logical LTR with sample JSP pages, you may need to manually edit the Result.jsp file generated by the HATS Toolkit. Following the line with the <body> tag, insert the line, <div dir=rtl> for logical RTL, <bdo dir=ltr> for visual LTR, or <bdo dir=rtl> for visual RTL.

Use of the Web services explorer for cases of reordering other than logical LTR, is not recommended.

When creating or updating Web service support files, on the Choose Properties page, where you select the input and output properties that you want exposed in the Web service, the following bidirectional input and output properties are selected by default. When exposed to the Web service, these properties can be changed by the consumer of the Web service.

Support of RESTful Web services

RESTful Web services are supported for bidirectional sessions. When creating or updating RESTful service resources, on the Configure JAX-RS Resource Method page, where defaults are set that reflect the HTTP method and Integration Object you selected, the following bidirectional input and output method parameters are also set to their defaults.

You can change the settings for these method parameters to meet your requirements. For more information see the chapters, Creating RESTful Web services and Using the HATS bidirectional API, in the HATS Web Application Programmer's Guide

Portlet support

Communication between portlets is implemented in HATS using global variables. HATS global variables are stored in visual LTR format, which is typical for 3270 and 5250 systems. However, data stored in other operating system environments is typically stored in logical LTR format. This means that by default HATS portlets use bidirectional text strings stored in the visual LTR format, while non-HATS portlets may use logical LTR format for bidirectional text strings.

To enable the exchange of bidirectional text strings between HATS portlets (using visual LTR format) and non-HATS portlets (using logical LTR format), you must specify to HATS that format conversion is required. To do this in a sending HATS portlet, when adding or editing the Send Global Variable action, select Convert to logical bidi format. For more information, see Send global variable action. To do this in a receiving HATS portlet, when adding or editing the received property (JSR168) or event (JSR286), select Convert from logical bidi format. For more information, see Portlet settings.

Note:
Conversion should not be performed when communicating between two portlets using the same format, for example between two HATS portlets.

Information for users

HATS applications using bidirectional code pages offer a special input field called a visual input field. Unlike regular fields, which implement logical data input and presentation, the visual field implements visual data input and presentation. When entering data in a visual field, you can use these functions:

Alt+Shift: Language selection
This key combination toggles the language layer back and forth between Latin and the bidirectional language.
Alt+Enter: Screen reverse
This key combination reverses the direction of the screen.
Shift+NumLock: Push
You can enter and edit text whose direction is opposite from the field direction.
Shift+NumPad "/" character: End push
Push mode is ended and the cursor moves to the end of the push segment.
Alt+NumPad "/" character: Auto push
You can type mixed left-to-right and right-to-left text by changing the language layer. Autopush is especially useful for typing digits in right-to-left fields. The push and end push functions are automatically activated according to the language of the text being typed. In right-to-left fields, typing a digit or a Latin letter causes the automatic initiation of push, without a language change. Additional Latin letters or digits will continue the push mode; any other character automatically terminates push mode. This feature allows you to type bidirectional text with embedded numbers or Latin words without using push and end push.

In left-to-right fields, typing a bidirectional character causes the automatic initiation of push. Typing any digit or Latin character causes the automatic termination of the mode. This enables the user to type Latin text with embedded bidirectional words by using language layer selection rather than push and end push.

You can initially enable or disable auto push mode using the Enable Auto Push mode initially setting. This setting is available in two places within the project editor. On the Overview tab, click the link to the current theme and use the Enable Auto Push mode initially setting. On the Other tab select the Client Settings section and use the Enable Auto Push mode initially setting.

Note:
When using auto push on a JSF Web page that interfaces to an Integration Object, you may need to change the field size manually if necessary to enter more characters than the default browser input field size allows.

Auto field reverse

Alt+NumPad 5
When Auto Field Reverse is activated all fields, with the exception of password fields will have the same (described above) behavior. In 3270 sessions right-to-left screens, auto field reverse is the default mode of operation.

Field reverse

Alt+Numlock
When field reverse is activated, typing orientation in current (focused) field will be changed. If the field is empty, cursor will be adjusted to the opposite side of the field. When field is not empty, the cursor position will not change. Field reverse is active only in the current field. When focus is lost, the typing orientation returns to its previous value.

Clipboard functions

Clipboard operations (such as copy, paste, and cut) with bidirectional data from platform logical editors into HATS visual field, and from HATS visual fields (including static text) into platform logical editors are enabled on Windows platforms. Users working in Windows can use the clipboard to exchange data between HATS and other applications that use logical data.

Internet Explorer clipboard operations are supported both from the Edit option on the menu bar or with the help of shortcuts (Ctrl+C, Ctrl+X, Ctrl+V).

Clipboard bidirectional data support on Mozilla browsers on Windows platforms will be enabled only if these functions are invoked using the shortcuts.

Operator information area (OIA)

In addition to session related information being displayed in the Operation Information Area (OIA), bidirectional sessions include information about screen and typing direction, active layer, auto field reverse mode status and shaping status (in Arabic sessions).

Bidirectional session (keyboard) related information is presented in a form similar to that used on the host system. To display this information in the OIA of a HATS transformation, in the Project Settings editor on the Rendering tab, select Operator Information Area and then select the Show OIA check box. When the Show OIA check box in the Project Settings editor is cleared, the HATS bidirectional status area is displayed in the status bar for Web applications, but not displayed anywhere for rich client applications.

Automatic keyboard layer switching

For HATS Web projects, with this function you can simulate switching the keyboard layer between bidirectional and Latin languages automatically when the screen is reversed. The simulation is performed through the use of keyboard remapping. This forces insertion of Arabic/Hebrew or Latin characters in accordance with the field typing direction. For example, in a reversed screen, when text typing takes place from right to left, Arabic/Hebrew characters are inserted irrespective of the actual keyboard layer state. To enable this function, in the Project Settings editor, on the Overview tab, click the current theme and select Enable automatic keyboard layer switch. This setting can also be selected in the Project Settings editor on the Other tab in the Client Settings section.

HATS rich client projects always behave as if this function is enabled.

Note:
Password fields, and other special fields that are not based on visual input field, function according to the system keyboard setting, that is, keyboard remapping is not performed for these types of fields.

IBM i 5250 Unicode support

Bidirectional text that appears in Unicode fields that use 5250 systems is displayed and edited using contextual ordering scheme (according to the first strong character) instead of using visual input field.

Functions for Arabic code pages

These functions are specific to projects using Arabic code pages.

HATS Toolkit screen orientation

To start the HATS Toolkit development environment using the desired screen orientation, you can use the HATS Toolkit start menu items. Use of the Arabic translation of the HATS Toolkit is dependent on Arabic support provided by the underlying Rational SDP platform. When installed on an Arabic translation of Rational SDP, two HATS Toolkit start menu items are provided, HATS Toolkit (Arabic), which starts the Arabic translation of HATS Toolkit, and HATS Toolkit (English), which starts the English translation of HATS Toolkit. Search the Knowledge Center for your Rational SDP platform to determine if Arabic is supported.

If not using the HATS Toolkit start menu items, to specify the orientation to use for the HATS Toolkit , use the -nl or -dir Eclipse startup arguments as shown in the table below.

Table 18. HATS Toolkit orientation settings
Eclipse startup argument HATS Toolkit orientation
-nl <BIDI locale> and the BIDI language pack is installed right-to-left
-nl <BIDI locale> and the BIDI language pack is not installed left-to-right
-nl <BIDI locale> -dir rtl right-to-left
-dir rtl right-to-left
-nl <BIDI locale> -dir ltr left-to-right
-nl <non-BIDI locale> left-to-right
-dir ltr left-to-right

For example, start the HATS Toolkit using eclipse.exe -OpenHatsPerspective -nl ar -dir rtl for Arabic. If no Eclipse startup arguments are specified, the HATS Toolkit orientation is left-to-right regardless of the development workstation locale.

Customizing the direction for JSP pages

In some cases, you might need to customize a template, transformation, or other JSP page, for example, the stop.jsp page, to create the desired direction. To do this, add the attributes dir=rtl and align=rtl to the HTML tags as appropriate. For example, for the stop.jsp page you could add dir=rtl to the <table> tag that surrounds the text of the stop.jsp page.

Shaping direction

If you enable the Screen reverse button in the application keypad settings, the RTL Shaping button is also displayed for Arabic code page projects. Clicking the RTL Shaping button switches the state of RTL shaping on or off. Turning RTL shaping off informs HATS that the user is currently editing a LTR file independent of screen orientation. Turning RTL shaping on informs HATS that the user is currently editing a RTL file independent of screen orientation, thus the same Arabic shaped data can be submitted correctly in both screen orientations. You should ensure before editing and submitting an LTR file that RTL shaping is turned off and ensure that RTL shaping is turned on before editing and submitting an RTL file.

Arabic selective shaping

In some cases you may need to send your data to the host in isolated format. To meet such requirements a field disable shaping property has been added for Arabic sessions through two check boxes:

Symmetric and numeric swapping

These options are effective only in Arabic 3270 sessions. If symmetric swapping is enabled, swapping characters are swapped in right-to-left screens. If numeric swapping is enabled, English numerals are replaced by Arabic numerals in right-to-left screens and Arabic numerals are replaced by English numerals in right-to-left screens. These parameters are set on the Advanced tab of the connection editor in the Configure optional, advanced connection settings section. The parameters are identified as symmetricSwapEnabled and numericSwapEnabled, and the values of the parameters are either true or false.

The HATS host terminal is also affected by symmetric and numeric swapping parameters.

Disable entry of Arabic-Western digits

When you create a new HATS project, or when you create or edit a HATS connection, and select the Arabic Speaking code page 420, the setting, Disable entry of Arabic-Western digits in RTL screens, is displayed. Select this option to disable entry of Arabic-Western numbers, that is, allow entry of only Arabic-Indic numbers in RTL screens. Do this so that, when submitted, all numbers are submitted as Arabic-Western numbers.

Automatic keyboard layer switching

The Arabic keyboard has two layouts, 101 keyboard layout and 102 keyboard layout, which are slightly different in some keys. When using the automatic keyboard layer switching function, the following mappings are performed:

Host terminal limitations

The following limitations appear with both system keyboard layout English and the Arabic 101 keyboard:

These limitations disappear with the Arabic 102 keyboard.

When using an Arabic 102 keyboard, the following keyboard limitations appear:

In order to correctly display any of these characters, you will need to switch the keyboard layer to English.

Screen captures

For an Arabic session with right-to-left captured screens, brackets and numerals are affected by the symmetric and numeric swapping options of the application.

Note:
In Arabic sessions, the Euro sign is displayed as a block in a captured screen.

Setting Arabic printing sessions on System i Access for Web

Following is a summary of the settings to present Arabic data properly on System i® Access for Web.

For Global settings:

SCS reports:

AFP reports:

Other considerations

Additions to HATS files

When a project uses an Arabic code page, screen event (.evnt) files have an additional <orientation>true</orientation> tag within the description tag. A value of true indicates that the screen is customized as a right-to-left screen; otherwise it is customized as left-to-right.

When a project uses any bidirectional code page, the connection (.hco) file has an additional enableScrRev attribute of the <hodconnection> tag, that can have the following values:

(blank)
The Screen reverse button is not placed on any screens.
NotCustomized
The Screen reverse button is placed only on screens that do not match a screen customization.
Customized
The Screen reverse button is placed on all screens.

When a project uses any Arabic code page, the connection (.hco) file has an additional disableFldShp attribute of the <hodconnection> tag that can have either true or false values

If printing is selected in 3270 session an additional printRTLSupport setting will appear in <classSetttings> tag. For Arabic 3270 sessions, another two settings will appear for symmetric and numeric swapping which are printSymSwapSuppot and printNumSwapSupport. All these printing settings have values of true or false equivalent to enable or disable of the feature.

When a project uses any bidirectional code page, the application (.hap) file has additional attributes for the <replace> tag within the <textReplacement> tag:

matchLTR
Text is to be replaced when the screen orientation is left-to-right.
matchRTL
Text is to be replaced when the screen orientation is right-to-left.
matchReverse
Text is to be replaced when the screen orientation is reversed.