One setting, $padLocale, says which language and conventions a request is
written in. The {trans} tag and the trans, currency and
localDate functions all read it.
|
PHP fragments/locale_1.php |
HTML fragments/locale_1.pad |
Result |
|---|---|---|
|
|
Je winkelwagen3 artikelen - Bewaard voor Ann € 1.234,50 - 5 oktober 2026 |
The texts live in _lang/<locale>.json, one flat object of keys:
{
"cart.title": "Je winkelwagen",
"cart.items": "%d artikel|%d artikelen",
"cart.owner": "Bewaard voor :name"
}
count= picks the plural form and replaces %d: two forms are one and other, three are zero, one and other.name= replaces :name._data file: from the page's directory up to the application root, then _common, the most specific winning. For nl_NL the files nl_NL.json, nl-NL.json and nl.json all count.$padLocale - the locale, 'en' unless the configuration or the page says otherwise.$padLocales - the locales the application speaks. When it lists any, a ?lang=nl link chooses one and the padLang cookie keeps it; without a choice the visitor's Accept-Language picks the best match.$padTimezone - the timezone dates are shown in.