Package: gtk

Function gtk-locale-direction

Lambda List

gtk-locale-direction ()

Return Value

The value of the gtk-text-direction enumeration of 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 type gtk-text-direction otherwise. The value :none will never be returned.

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

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

Example

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

See also

2020-8-21