To: jhspies at adept.co.za Cc: lablgtk at kaba.or.jp Subject: Re: How do I set the locale in lablgtk? In-Reply-To: <20020313202926.GA1883 at adept.co.za> References: <20020313202926.GA1883 at adept.co.za> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20020314120032O.garrigue at kurims.kyoto-u.ac.jp> Date: Thu, 14 Mar 2002 12:00:32 +0900 From: Jacques Garrigue Lines: 27 From: Johann Spies > I want to change the language of e.g. the calendar widget to use the > af_ZA locale. How do I do that? You should set manually the LC_ALL or LANG environment variables, before starting your program. Note that you also need to set GTK_SETLOCALE for this setting to be used. Here is the paragraph on locale handling in LablGTK. Locale or not locale ? Until version 1.2.0, lablgtk called setlocale automatically on intitialization. Unfortunately, this appears to have side effects in some cases, particularly when the locale defines a numeric format different from the standard one. Since locale must be set before initialization, you may do it in two ways: * set the GTK_SETLOCALE environment variable to a non-0 value * use the ~setlocale parameter to GMain.Main.init (if you do not link gtkInit.cmo) Note that GTK_SETLOCALE, when set, overrides ~setlocale. On some systems you may also need to link libxpg4.so for the locale to work. --------------------------------------------------------------------------- Jacques Garrigue Kyoto University garrigue at kurims.kyoto-u.ac.jp JG