package gettext-stub

  1. Overview
  2. Docs

Module GettextStubCompatSource

Low level interface to gettext C library.

  • author Sylvain Le Gall
Sourcetype lc =
  1. | LC_CTYPE
  2. | LC_NUMERIC
  3. | LC_TIME
  4. | LC_COLLATE
  5. | LC_MONETARY
  6. | LC_MESSAGES
  7. | LC_ALL
Sourceval setlocale : lc -> string -> string option

Set the current localization for the category

Sourceval gettext : string -> string

Look up MSGID in the current default message catalog for the current * LC_MESSAGES locale. If not found, returns MSGID itself (the default text).

Sourceval dgettext : string -> string -> string

Look up MSGID in the DOMAINNAME message catalog for the current LC_MESSAGES * locale.

Sourceval dcgettext : string -> string -> lc -> string

Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY * locale.

Sourceval ngettext : string -> string -> int -> string

Similar to `gettext' but select the plural form corresponding to the number * N.

Sourceval dngettext : string -> string -> string -> int -> string

Similar to `dgettext' but select the plural form corresponding to the number * N.

Sourceval dcngettext : string -> string -> string -> int -> lc -> string

Similar to `dcgettext' but select the plural form corresponding to the * number N.

Sourceval textdomain : string -> string option

Set the current default message catalog to DOMAINNAME.If DOMAINNAME is "", * reset to the default of "messages".

Sourceval get_textdomain : unit -> string option

Get the current default message catalog to DOMAINNAME.

Sourceval bindtextdomain : string -> string -> string option

Specify that the DOMAINNAME message catalog will be foundin DIRNAME rather * than in the system locale data base.

Sourceval bind_textdomain_codeset : string -> string -> string option

Specify the character encoding in which the messages from theDOMAINNAME * message catalog will be returned.