Function

Gtk-3.0Gtkget_locale_directionSince 3.12

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

    This function depends on the current locale being set with setlocale() and will default to setting the Gtk.TextDirection.LTR direction otherwise. Gtk.TextDirection.NONE will never be returned.

    GTK+ sets the default text direction according to the locale during gtk_init(), and you should normally use gtk_widget_get_direction() or gtk_widget_get_default_direction() to obtain the current direcion.

    This function is only needed rare cases when the locale is changed after GTK+ has already been initialized. In this case, you can use it to update the default text direction as follows:

    setlocale (LC_ALL, new_locale);
    direction = gtk_get_locale_direction ();
    gtk_widget_set_default_direction (direction);

    Returns Gtk.TextDirection

    the Gtk.TextDirection of the current locale

    3.12