Next: GNU Smalltalk, Previous: D, Up: Individual Programming Languages [Contents][Index]
ocaml, ocaml-gettext-devel
ocaml, opam
opam install gettext-stub
ml
"abc"
(s_ "abc") or, for format strings, (f_ "abc")
s_, f_, sn_, fn_, and also
gettext, fgettext,
dgettext, fdgettext,
dcgettext, fdcgettext,
ngettext, fngettext,
dngettext, fdngettext,
dcngettext, fdcngettext.
textdomain field in first parameter of Gettext.Program
dir field in first parameter of Gettext.Program
—
Declare the libraries gettext.base and gettext-stub
in the ‘dune’ file.
Use (assuming that you pass GettextStub.Native
as second parameter of Gettext.Program)
xgettext
In the source code: Printf.fprintf "%d %d"
In the msgid: "%d %d"
In the msgstr: "%2$d %1$d"
Note: This does not work yet; it depends on the completion of
https://github.com/gildor478/ocaml-gettext/issues/39.
fully portable
—
An example is available in the examples directory: hello-ocaml.