Software: Apache/2.0.54 (Fedora). PHP/5.0.4 uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 uid=48(apache) gid=48(apache) groups=48(apache) Safe-mode: OFF (not secure) /usr/share/gtk-doc/html/glib/ drwxr-xr-x |
Viewing file: Select action/file-type:
Synopsis#include <glib.h> #include <glib/gi18n.h> #define _ (String) #define Q_ (String) #define N_ (String) const gchar* g_strip_context (const gchar *msgid, const gchar *msgval); const gchar* const * g_get_language_names (void); Description
GLib doesn't force any particular localization method upon its users.
But since GLib itself is localized using the
In order to use these macros in an application, you must include
#define GETTEXT_PACKAGE "gtk20" #include <glib/gi18n-lib.h>
Details_()#define _(String) Marks a string for translation, gets replaced with the translated string at runtime.
Since 2.4 Q_()#define Q_(String)
Like One use case given in the gettext manual is GUI translation, where one could e.g. disambiguate two "Open" menu entries as "File|Open" and "Printer|Open". Another use case is the string "Russian" which may have to be translated differently depending on whether it's the name of a character set or a language. This could be solved by using "charset|Russian" and "language|Russian".
Since 2.4 N_()#define N_(String) Marks a string for translation, gets replaced with the untranslated string at runtime. This is useful in situations where the translated strings can't be directly used, e.g. in string array initializers. { static const char *messages[] = { N_("some very meaningful message"), N_("and another one") }; const char *string; ... string = index > 1 ? _("a default message") : gettext (messages[index]); fputs (string); ... }
Since 2.4 g_strip_context ()const gchar* g_strip_context (const gchar *msgid, const gchar *msgval);
An auxiliary function for
Since 2.4 g_get_language_names ()const gchar* const * g_get_language_names (void); Computes a list of applicable locale names, which can be used to e.g. construct locale-dependent filenames or search paths. The returned list is sorted from most desirable to least desirable and always contains the default locale "C". For example, if LANGUAGE=de:en_US, then the returned list is "de", "en_US", "en", "C".
This function consults the environment variables
Since 2.6
|
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0031 ]-- |