When writing a widget, you should consider how the presented information will be perceived by different users around the world. Writing a truly internationalized widget requires considerable expertise.
One of the most important parts of writing an internationalized widget is in allowing for different layout directions. The desired layout direction is held by the XmNlayoutDirection resource of XmPrimitive and XmManager.
XmNlayoutDirection also affects the layout direction of text. In some languages, text must be displayed from left to right; other languages display text from right to left; and in some Asian languages, text is displayed vertically (from top to bottom). For this reason, all Motif widgets that display text need to base text direction on the value of the XmNlayoutDirection resource. The XmPrimitive and XmManager widgets will set an appropriate default value for XmNlayoutDirection based on the locale. Your task as a widget writer is to have your widget read the value of XmNlayoutDirection and render it appropriately.