Package: gtk

Function gtk:locale-direction

Lambda List

gtk:locale-direction ()

Return Value

The gtk:text-direction value with the current locale.

Details

Gets the direction of the current locale. This is the expected reading direction for text and UI.

This function depends on the current locale and will default to setting the :ltr direction of the gtk:text-direction enumeration otherwise. The value :none will never be returned.

GTK sets the default text direction according to the locale during the execution of the gtk_init() function, and you should normally use the gtk:widget-direction or gtk:widget-default-direction function to obtain the current direction.

This function is only needed rare cases when the locale is changed after GTK has already been initialized.

Examples

You can use the gtk:locale-direction function to update the default text direction as follows:
(setf (gtk:widget-default-direction) (gtk:locale-direction))
=> :LTR    
 

See also

2023-3-5