Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n and gdprPrivacyPolicyUrl and gdprConsentMessage #487

Open
robsch opened this issue Dec 23, 2022 · 1 comment
Open

i18n and gdprPrivacyPolicyUrl and gdprConsentMessage #487

robsch opened this issue Dec 23, 2022 · 1 comment

Comments

@robsch
Copy link

robsch commented Dec 23, 2022

How can these settings reflect the current user language?

It would be nice if this could be part of the application configuration.

@TonisOrmisson
Copy link
Contributor

``The default gdprConsentMessage is part of module's i18n and is delivered in the user language. If you apply a custom message, you would want to apply it not in config (no app yet at that point), but apply it in any bootstrap component, eg AppBootstrap or whatever you have. In the Bootstrap you would get the module and apply the properties via your app i18n. In Bootstrap something like:

        /** @var Module $module */
        $module = Yii::$app->getModule('user');
        $module->gdprConsentMessage = Yii::t('app', "My custom message that I have in my apps i18n");
        $module->gdprPrivacyPolicyUrl = "https://example.com/".Yii::$app->language;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants