Changing text content dynamically from language file

Hi,

Was wondering if there was a way to change text content of CookieConsentSummary dynamically

<phrase id="CookieConsentSummary" value="Use this space to summarize your privacy and cookie use policy."/><!-- v2021 -->

set your content in the language load event

// Language Load event
function Language_Load(): void
{
                $this->setPhrase("PrivacyPolicy", "MY TEXT");
                $this->setPhrase("cookieconsentsummary", "MY TEXT");
                $this->setPhrase("PrivacyPolicyContent", "MY TEXT");
}
1 Like

Perfect. Thank you

So I am happy to note that I could put an include() there and point it to a php file on the server so that data could be dynamically changed from Settings.

I also want to allow admin to turn Cookies declaration on or off from settings.
Would you happen to know how that might be done?

If you enable the feature, the code is generated, but you can add CSS to hide the cookie consent toast so that it cannot be seen. The class is Config("COOKIE_CONSENT_CLASS").