Re: Gtk+3 application Internationalization
- From: "A. da Mek" <a da_mek0 ufoni cz>
- To: gtk-app-devel-list gnome org
- Subject: Re: Gtk+3 application Internationalization
- Date: Fri, 15 Apr 2016 08:10:10 +0000
How is localisation done in the new system?
In the same way you localize your application's strings
For simple programs, I do not bother to do my own localization, because
most of needed words are already available in localization files of GTK
and its components. Thus I define:
#define A_(String) g_dpgettext ("atk10", String, 0)
#define L_(String) g_dpgettext ("glib20", String, 0)
#define G_(String) g_dpgettext ("gtk20", String, 0)
#define P_(String) g_dpgettext ("gtk20-properties", String, 0)
and then I can use for example:
G_("File"), P_("Image"), A_("paragraph")
and so on.
But of course, some of these words are not available in all versions.
Another possibility is to use localization files of other programs which
also use .mo files (for example GIMP).
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]