manpagez: man pages & more
info gpgme
Home | html | info | man

File: gpgme.info,  Node: Locale,  Next: Additional Logs,  Prev: Context Flags,  Up: Context Attributes

7.4.14 Locale
-------------

A locale setting can be associated with a context.  This locale is
passed to the crypto engine, and used for applications like the PIN
entry, which is displayed to the user when entering a passphrase is
required.

   The default locale is used to initialize the locale setting of all
contexts created afterwards.

 -- Function: gpgme_error_t gpgme_set_locale (gpgme_ctx_t CTX,
          int CATEGORY, const char *VALUE)
     SINCE: 0.4.3

     The function ‘gpgme_set_locale’ sets the locale of the context CTX,
     or the default locale if CTX is a null pointer.

     The locale settings that should be changed are specified by
     CATEGORY.  Supported categories are ‘LC_CTYPE’, ‘LC_MESSAGES’, and
     ‘LC_ALL’, which is a wildcard you can use if you want to change all
     the categories at once.

     The value to be used for the locale setting is VALUE, which will be
     copied to GPGME’s internal data structures.  VALUE can be a null
     pointer, which disables setting the locale, and will make PIN entry
     and other applications use their default setting, which is usually
     not what you want.

     Note that the settings are only used if the application runs on a
     text terminal, and that the settings should fit the configuration
     of the output terminal.  Normally, it is sufficient to initialize
     the default value at startup.

     The function returns an error if not enough memory is available.

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.