{{- /* responsible-gambling-block.html — locale-aware RG messaging. Call with (dict "page" . "variant" "compact"|"full"). Server renders the DEFAULT locale; the locale switcher updates the [data-age-value] / [data-rg-name] / [data-rg-link] elements client-side. */ -}} {{- $page := .page -}} {{- $variant := .variant | default "full" -}} {{- $brand := $page.Site.Data.brand -}} {{- $locales := $page.Site.Data.locales -}} {{- $currentLocale := $page.Language.LanguageCode | default $brand.defaultLocale -}} {{- $default := "" -}} {{- with where $locales "locale" $currentLocale -}}{{- $default = index . 0 -}}{{- end -}} {{- $age := $brand.ageRestrictionDefault -}} {{- $orgName := "your national support service" -}} {{- $orgUrl := "#" -}} {{- with $default -}} {{- $age = .ageRestriction -}} {{- $orgName = .responsibleGamblingOrgName -}} {{- $orgUrl = .responsibleGamblingUrl -}} {{- end -}} {{- if eq $variant "compact" -}}
{{ printf (i18n "rgCompactIntro") $age }}
{{ i18n "rgNeedHelp" }} {{ $orgName }}.
{{- else -}}{{ printf (i18n "rgFullIntro") $age }}
{{ i18n "rgRegionRecommends" }} {{ $orgName }}. {{ i18n "rgSupportIntro" }}
| {{ i18n "region" }} | {{ i18n "minimumAge" }} | {{ i18n "supportOrganisation" }} |
|---|---|---|
| {{ .label | default .locale }} | {{ .ageRestriction }}+ | {{ .responsibleGamblingOrgName }} |