NAME

XtSetLanguageProc - set the language procedure

SYNTAX

Widget XtSetLanguageProc(XtAppContext _a_p_p___c_o_n_t_e_x_t, XtLanguageProc _p_r_o_c, XtPointer _c_l_i_e_n_t___d_a_t_a);

ARGUMENTS

_a_p_p___c_o_n_t_e_x_t Specifies the application context in which the language procedure
is to be used, or NULL.

_p_r_o_c Specifies the language procedure, or NULL.

_c_l_i_e_n_t___d_a_t_a Specifies additional client data to be passed to the language procedure
when it is called.

DESCRIPTION

_X_t_S_e_t_L_a_n_g_u_a_g_e_P_r_o_c sets the language procedure that will be called from _X_t_D_i_s_p_l_a_y_I_n_i_t_i_a_l_i_z_e for all subsequent Displays initialized in the specified application context. If _a_p_p___c_o_n_t_e_x_t is NULL, the specified language procedure is registered in all application contexts created by the calling process, including any future application contexts that may be created. If _p_r_o_c is NULL a default language procedure is registered. _X_t_S_e_t_L_a_n_g_u_a_g_e_P_r_o_c returns the previously registered language procedure. If a language procedure has not yet been registered, the return value is unspecified but if this return value is used in a subsequent call to _X_t_S_e_t_L_a_n_g_u_a_g_e_P_r_o_c, it will cause the default language procedure to be registered.

The default language procedure does the following:

· Sets the locale according to the environment. On ANSI C-based systems
this is done by calling _s_e_t_l_o_c_a_l_e( _L_C___A_L_L, language ). If an error is encountered a warning message is issued with _X_t_W_a_r_n_i_n_g.
· Calls
_X_S_u_p_p_o_r_t_s_L_o_c_a_l_e to verify that the current locale is supported. If the locale is not supported, a warning message is issued with _X_t_W_a_r_n_i_n_g and the locale is set to ``C''.
· Calls
_X_S_e_t_L_o_c_a_l_e_M_o_d_i_f_i_e_r_s specifying the empty string.
· Returns the value of the current locale. On ANSI C-based systems this
is the return value from a final call to _s_e_t_l_o_c_a_l_e( _L_C___A_L_L, NULL ).

A client wishing to use this mechanism to establish locale can do so by calling _X_t_S_e_t_L_a_n_g_u_a_g_e_P_r_o_c prior to _X_t_D_i_s_p_l_a_y_I_n_i_t_i_a_l_i_z_e_.

SEE ALSO


_X _T_o_o_l_k_i_t _I_n_t_r_i_n_s_i_c_s _- _C _L_a_n_g_u_a_g_e _I_n_t_e_r_f_a_c_e
_X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e