Appearance
Multilingual Sites
Consent Overlays can be used on multilingual sites to display your content in different languages. To achieve this, create your own language constants, place them in the corresponding customizer fields and translate your constants using language overrides.
Translatable fields
All content blocks recognize language constants and will translate them into language strings. You can use language constants within these fields:
- Title
- Content
- Image Alt
- Info Button Text
- Consent Button Text
- Withdrawal Button Text
TIP
Note that you can also use special elements like [custom text](consent)
in your language strings. Make sure you write them exactly as you would do in the text editor code view.
How to translate
We will show you an example how to use language constants and translate them in Joomla!.
Go to YOOtheme Pro → Corporate Tools → Consent Tools → Consent Overlay → reCAPTCHA → Content.
Switch the editor to Code view and enter exactly the following language constant:
textCORPORATE_CONSENT_RECAPTCHA_CONTENT
Go to Joomla! Backend → System → Language Overrides.
Select your frontend language, for example English (United Kingdom) - Site.
Click New in the toolbar.
Into the Language Constant field, enter exactly:
textCORPORATE_CONSENT_RECAPTCHA_CONTENT
Into the Text field, enter your translated language string with respect to special syntax elements. Your language string could look like this:
html<strong>We need your consent to load the reCAPTCHA service!</strong> We use reCAPTCHA to check your entered information. This service may collect data about your activity. Please <strong>[review the details](info)</strong> and <strong>[accept the service](consent)</strong> to proceed.
TIP
You can freely choose the name of your language constant. Make sure to use a unique name with a common prefix like CORPORATE_CONSENT_
. Don't use whitespaces in constant names. Learn more about language overrides in the official Joomla! documentation.