tr

Translate a message in the correct plural form.

This does *not* instantiate a new function for every marked string (the signature is fabricated for the sake of documentation).

The first argument should be in singular form, the second in plural form. Note that the format specifier %d is optional.

  1. template tr(string singular, string[Tr] attributes = null)
  2. template tr(string singular, string plural, string[Tr] attributes = null)
    version(!xgettext)
    template tr (
    string singular
    string plural
    string[Tr] attributes = null
    ) {}

Members

Manifest constants

tr
enum tr;
Undocumented in source.

Return Value

The translation if one exists in the selected language, or the corresponding original otherwise.

Examples

writeln(tr!("There is a goose!", "There are %d geese!")(n));

See Also

Meta