This guide covers how to control locale and time zone when generating documents — so dates, numbers, currency and timestamps render correctly for the audience receiving the document. It assumes you're already familiar with the basic generation flow covered in Generate Document.
| Setting | Controls |
|---|---|
locale | Language- and region-specific formatting — dates, numbers and currency |
timeZone | The time zone date and time values are rendered in. It affects the generated document only — timestamps in API responses are always UTC |
language | The wording applied when generating (for example, which Template Label translations are used). Set on a Document Solution Configuration |
Setting one does not set the others: a document can be formatted for en-IE while its wording uses a different language.
On POST /documents/document/generate (and /generate/async), both values are mandatory on the document object, alongside output format and delivery settings:
{
"template": { ... },
"data": { ... },
"document": {
"name": "signed-contract",
"fileFormat": "pdf",
"deliveryMethod": "Storage",
"path": "root",
"locale": "en-IE",
"timeZone": "Europe/Dublin"
}
}en, de, en-IE or en-GB.Europe/Dublin. Note the capital Z: the field is timeZone.See the Locales and Timezones reference for accepted values.
A Configuration can carry locale, timeZone and language, all optional. They take the same locale values as the generate request. Give timeZone as an IANA name.
{
"documentSolutionConfiguration": {
"documentSolutionId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"name": "Invoice - PDF (Ireland)",
"fileFormat": "pdf",
"deliveryMethod": "Storage",
"path": "root",
"language": "en",
"locale": "en-IE",
"timeZone": "Europe/Dublin"
}
}A Document Request can set locale and timeZone itself, or inherit them. Each value is resolved when the request is saved, and stored on it:
en for locale, Europe/Dublin for timeZone{
"documentRequest": {
"name": "Invoice INV-2026-000123",
"documentTemplateId": "2b7c9e14-5a63-4f08-9d21-7c4e0b8a3f52",
"dataSourceId": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"documentSolutionConfigurationId": "7f1b2c3d-4e5f-4a6b-9c8d-0e1f2a3b4c5d",
"locale": "en-IE",
"timeZone": "Europe/Dublin"
}
}Use a locale code and an IANA name such as
Europe/Dublinfrom Locales and Timezones, on the request and on the Configuration.
Locale and time zone affect more than the final render — they also affect how date() parses string values inside expressions, as covered in the Expressions Reference. Doctavian expects every value in your data to be a string already formatted for the locale you generate in (for example "EffectiveDate": "Jun 30, 2025", "UnitPrice": "4,800" for an English-language locale). To avoid mismatches, keep three things aligned:
locale and timeZone values match the other twoDate parsing inside expressions is locale-dependent — the same string can resolve to a different date depending on the active locale. If your data, template, and request locale don't agree, dates can silently parse incorrectly rather than throwing an error. Always verify the rendered output when introducing a new locale.
To generate the same template for a different audience, change document.locale and document.timeZone — and upload data formatted for that locale, since data values are used as-is:
{
"document": {
"name": "signed-contract",
"fileFormat": "pdf",
"deliveryMethod": "Storage",
"path": "root",
"locale": "de",
"timeZone": "Europe/Berlin"
}
}With Document Solutions, the equivalent is one Configuration per audience — for example "Invoice - PDF (Ireland)" and "Invoice - PDF (Germany)" on the same solution — and naming the right one on each Document Request.
If your data or template contain locale-specific formatting of their own (for example, a date already formatted as a display string rather than passed through an expression), those won't automatically adapt — only values run through format() or similar expressions at generation time follow the request's locale and time zone.
locale, timeZone and language are separate settings