OCAML-GETTEXT(5)
π OCAML-GETTEXT π (section 5 of the manual, bestie)
okay so this is the manual page for ocaml-gettext β the common options that let you manage internationalisation in an OCaml program through the ocaml-gettext library. it's giving "make your program speak every language" energy β¨
β¨ SYNOPSIS β¨
[--gettext-failsafe [{ignore} | {inform-stderr} | {raise-exception}]]
[--gettext-disable] [--gettext-domain-dir {textdomain} {dir}] [--gettext-dir {dir}] [--gettext-language {language}] [--gettext-codeset {codeset}]
πΈ DESCRIPTION πΈ
this section gives you the quick tea on the common options that programs using the ocaml-gettext library all share. ngl, they're the vibe check for your translations π
--gettext-failsafe ignoreβ this defines howocaml-gettextbehaves when literally any error pops up while it's processing string translation.ignoreis the default behaviour, bestie. the string you get back is the original string, untranslated. it's consistent, and it keeps your output usable even when it's not perfect. lowkey iconic of it.--gettext-failsafe inform-stderrβ same behaviour asignore, except a message gets printed on stderr. so you still get your untranslated string, but it also tells on itself π--gettext-failsafe raise-exceptionβ this one is dramatic on purpose π it stops the program by raising an exception the moment an error is encountered. periodt.--gettext-disableβ disables any translation made byocaml-gettext. every single translation returns the original string, untranslated. no cap.--gettext-domain-dir textdomain dirβ defines adirto search for a specific domain. this is useful when your MO files are stored in a non standard directory, iykyk. π--gettext-dir dirβ adds a directory to search for MO files.--gettext-language languageβ sets the language to use in theocaml-gettextlibrary. the language should be POSIX compliant. it should follow this convention:lang[_territory][.charset][@modifier]. thelangandterritoryshould be two letters ISO code.charsetshould be a valid ISO character set (at least recognised by the underlying charset recoding routine). for example, valid languages are:fr_FR.ISO-8859-1@euro,de_DE.UTF-8. slay π--gettext-codeset codesetβ sets the codeset for output.
β οΈ okay so listen up, because this part matters. users should be aware that these command line options apply only for strings after the initialisation of the library. this means that if the options initially guessed byocaml-gettextdon't match the command line provided, there should be some untranslated string, because these strings are translated before parsing options. this is particularly true for the usage message itself (--help): even if the strings are translated, they are translated before setting the correct option. it's giving "translated too early, bestie" π
some options (--gettext-codeset for example) are overrided internally for particular use. it should be required to always translate strings to UTF-8 in graphical user interface (because GTK2 requires it). so like, UTF-8 or nothing, fr fr π
π AUTHORS π
Sylvain Le Gall.
okay that's the whole page, bestie, you ate it π«Ά this one's from the ocaml-gettext source, dated 2008-04-29, and it lives at section OCAML-GETTEXT(5) in the manual β so go forth and internationalise, main character π
β¨ππ¦
π¦ where this page comes from
- alpine 3.24: ocaml-gettext-doc 0.4.2-r6 Β· LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception
- centos-stream 10: ocaml-gettext-devel 0.4.2-23.el10 Β· LGPL-2.1-or-later with OCaml-LGPL-linking-exception
- centos-stream 9: ocaml-gettext-devel 0.4.2-6.el9 Β· LGPLv2+ with exceptions
- debian bookworm: libgettext-ocaml-dev 0.4.2-1+b5 Β· LGPL-2.1-or-later
- debian trixie: libgettext-ocaml-dev 0.5.0+really0.4.2-1+b1 Β· LGPL-2.1-or-later
- fedora 43: ocaml-gettext-devel 0.5.0-6.fc43 Β· LGPL-2.1-or-later with OCaml-LGPL-linking-exception
- fedora 44: ocaml-gettext-devel 0.5.0-8.fc44 Β· LGPL-2.1-or-later with OCaml-LGPL-linking-exception
- nixos 26.05: ocaml5.4.1-gettext 0.5.0
- nixpkgs unstable: ocaml5.5.1-gettext 0.5.0
- opensuse-leap 16.0: ocaml-gettext 0.4.2-160000.3.2 Β· SUSE-LGPL-2.0-with-linking-exception
- opensuse-leap 16.0: ocaml-gettext 0.4.2-160000.3.2 Β· SUSE-LGPL-2.0-with-linking-exception
- opensuse-leap 16.0: ocaml-gettext 0.4.2-160000.3.2 Β· SUSE-LGPL-2.0-with-linking-exception
- opensuse-leap 16.0: ocaml-gettext 0.4.2-160000.3.2 Β· SUSE-LGPL-2.0-with-linking-exception
- ubuntu jammy: libgettext-ocaml-dev 0.4.2-1build3 Β· LGPL-2.1-or-later
- ubuntu noble: libgettext-ocaml-dev 0.4.2-3build1 Β· LGPL-2.1-or-later
- ubuntu questing: libgettext-ocaml-dev 0.5.0+really0.4.2-1build1
- ubuntu resolute: libgettext-ocaml-dev 0.5.0++git5-g6591d7a-1build1 Β· LGPL-2.1-or-later
- ubuntu stonking: libgettext-ocaml-dev 0.5.0++git5-g6591d7a-1build3 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms