J!Extensions Store™
Faq Can i use multilanguage for contents of the cookie toolbar?

Can i use multilanguage for contents of the cookie toolbar?

Created on:Thursday, 03 May 2018 00:00

Yes of course, the GDPR component supports the Joomla! multilanguage. To learn more watch the video tutorial and read the docs below:

You can customize contents and links to policies of the cookie consent toolbar and of the whole component in general. In the case that your site is multilanguage you can use Joomla! language overrides and specify a string constant of your choice into parameter fields of the component instead of the actual text. Just put the chosen override inside each parameter that you want to translate:
multilanguage

Notice that language packs are for static contents only(backend, error/default messages), to change user defined text the multilanguage overrides of Joomla are used instead. This is done to have more flexibility and an easy usage in the case that a language pack is not available or not installed. You could even add language strings directly to a loaded language file achieving the same result as long as language strings included in the file match the ones specified as component settings.
You are not constrained when choosing the language strings to be used, you are free to choose your preferred ones, the important requirement is that strings chosen match the ones in the Joomla! language overrides system or language file:
multilanguage


If you don't know how Joomla! language overrides work, please refer to these tutorials:
https://docs.joomla.org/J3.x:Language_Overrides_in_Joomla
https://www.youtube.com/watch?v=rNAAwToolF0



Notice that using Joomla! language overrides a separate language file is created as well. So in the case that you have multiple websites and you want to replicate same language strings, you can easily copy the override file across each project. Override files can be found based on languages at the following path:
• root/language/overrides/en-GB.override.ini
• root/language/overrides/de-DE.override.ini
• root/language/overrides/fr-FR.override.ini
• etc


Some caveats when dealing with this system to avoid common improper uses:
• Disable all caching, clear all caching, disable JCH Optimize if you are using it!
• It's recommended that strings chosen are all starting with 'COM_GDPR_'
• Ensure that no extra-spaces are added at the beginning or at the end of each string
• Ensure that the language and the application side is correct, for example contents of the cookie toolbar must have strings assigned to 'Site' language in the dropdown
• Disable the TinyMCE editor, etc when editing the component fields for a language string. An editor could wrap automatically a language string inside HTML code thus preventing it to work. As an alternative, always use language strings starting with 'COM_GDPR_' and the component will purify automatically any editor html code.
• If using the old Joomla 2.5 not supporting the language override system, you can achieve the same result manually editing the main language file of Joomla!
• If you are editing the content of the data breach email, keep in mind that this is a backend feature, so the language string must be assigned to the 'Administrator' side

• Customizing links work as for any other normal textual strings, obviously you will specify a link in the language override instead of a text. You can see a live example in the demo backend website: https://demo.storejextensions.org/gdpr