A consent banner that translates itself
2026年7月1日
DOM/cookiewall is the GDPR banner, and the interesting part is what it does about language.
Consent text is the one string on a site that must be right in every language you serve, and it is also the string nobody wants to maintain. So the resource ships English and looks around: if the app has the lang system loaded, the banner translates itself through it, and a site that serves three languages gets three banners without a translation file entry.
An app that wants exact wording, which is a reasonable thing to want on a legal notice, overrides prop labels and gets full control. prop translate forces the behaviour on or off. The default is the useful one; the override is there for when the default is not.
It is deliberately subtle rather than a full-screen wall. A banner that blocks the page to ask permission to count visitors is out of proportion to what it is asking, and the visitor tracking behind it on this site keeps nothing that identifies a person.
This resource is also a small example of how the platform grew up. It used to be two, a plain banner and a translated variant, which meant every app had to know which one it wanted before knowing whether it would ever be multilingual. Merging them into one that adapts removed a decision nobody had enough information to make.
Engine 1.0. See cookiewall in the manual.