---
name: "Zonemaster::Translator"
section: "3pm"
platform: "linux"
package: "libzonemaster-perl"
version: "1.0.16-2.1"
release: "Debian 11 (Bullseye)"
platforms: ["linux"]
url: "https://new.carta.tech/Zonemaster::Translator"
---

# Zonemaster::Translator(3pm)

translation support for Zonemaster

## NAME

Zonemaster::Translator - translation support for Zonemaster

## SYNOPSIS

```
    my $trans = Zonemaster::Translator->new({ locale => 'sv_SE.UTF-8' });
    say $trans->to_string($entry);
```

## ATTRIBUTES

- locale

  The locale that should be used to find translation data. If not explicitly provided, defaults to (in order) the contents of the environment variable LANG, LC\_ALL, LC\_MESSAGES or, if none of them are set, to `"en_US.UTF-8"`.

- data

  A reference to a hash with translation data. This is unlikely to be useful to end-users.

## METHODS

- to\_string($entry)

  Takes a Zonemaster::Logger::Entry object as its argument and returns a translated string with the timestamp, level, message and arguments in the entry.

- translate\_tag

  Takes a Zonemaster::Logger::Entry object as its argument and returns a translation of its tag and arguments.

- BUILD

  Internal method that's only mentioned here to placate Pod::Coverage.
