How to translate the GDPR/CCPA app by using Gtranslate
Another week, another translation blog post. Article № 4 of the Translation blog post series is here. Below you will find all the steps you need to follow in order to translate the GDPR/CCPA + Cookie Management app by using Gtranslate. Let's get started:
Initial setting of the app
Gtranslate gives you two options for translation of the GDPR/CCPA app - as a Free plan user or as a Premium plan user. Before we take a look at the translation process, let's check how the admin side of the app looks like.
1. Navigate to the Apps section
2. Go to the Gtranslate app
When entering the app, you will see all the widget options you need to set up before starting the translation.
Here is how the admin side of the app looks like
Follow these steps in order to configure the app:
1. Select the outlook of the language switcher
2. Then, choose the default language of your store
3. After that choose the position of the switcher
4. Lastly, select the languages you want to use for translation
5. When you are done with the settings, click on the Save Changes button
Here is how the language switcher looks like
Translating the GDPR/CCPA app
Depending on the Gtranslate plan you are using, here are the two options for translating the GDPR/CCPA app. Let's take a look at the first one:
Translating as a Free plan user
If you are a Free plan user the content of your store will be translated right after you finish with the initial settings of the app.
Here is how the translated to German Cookie Bar and Preferences Popup look like
The Compliance pages are also translated.
Here is how the translate to German GDPR Compliance page looks like
By submitting any request on this page, you will see that the additional messages are also translated to German.
How the translated Data collection text looks like
How the translated confirmation for the submitted request looks like
Translating as a Premium plan user
In case you are using any of the Gtranslate paid plans, you will need to add an additional script to the theme.liquid file. Follow the steps below to see how you can do that:
1. Navigate to Online store
2. Go to Actions
3. Click on Edit code
4. Open the theme.liquid file and find the closing "</head>" string in there
5. When you locate it, add the following snippet before the closing "</head>" string:
{%- assign privacy_policy_text = shop.metafields.consentbar_text["privacy_policy_text"] -%} {%- assign accept_button_text = shop.metafields.consentbar_text["accept_button_text"] -%} {%- assign change_cookies_text = shop.metafields.consentbar_text["change_cookies_text"] -%} {%- assign text = shop.metafields.consentbar_text["text"] -%} {%- assign strict_cookies_checkbox = shop.metafields.preferences_text["strict_cookies_checkbox"] -%} {%- assign strict_cookies_text = shop.metafields.preferences_text["strict_cookies_text"] -%} {%- assign analytics_cookies_checkbox = shop.metafields.preferences_text["analytics_cookies_checkbox"] -%} {%- assign analytics_cookies_text = shop.metafields.preferences_text["analytics_cookies_text"] -%} {%- assign marketing_cookies_checkbox = shop.metafields.preferences_text["marketing_cookies_checkbox"] -%} {%- assign marketing_cookies_text = shop.metafields.preferences_text["marketing_cookies_text"] -%} {%- assign functionality_cookies_checkbox = shop.metafields.preferences_text["functionality_cookies_checkbox"] -%} {%- assign functionality_cookies_text = shop.metafields.preferences_text["functionality_cookies_text"] -%} {%- assign popup_header = shop.metafields.preferences_text["popup_header"] -%} {%- assign dismiss_button_text = shop.metafields.preferences_text["dismiss_button_text"] -%} {%- assign accept_selected_button_text = shop.metafields.preferences_text["accept_selected_button_text"] -%} {%- assign accept_all_button_text = shop.metafields.preferences_text["accept_all_button_text"] -%} {%- assign data_collection_text = shop.metafields.preferences_text["data_collection_text"] -%} <script type="text/javascript"> var final_JSON = { "all_txt": { "privacy_policy_text": "{{ privacy_policy_text | replace: '"' , '\"' }}", "accept_button_text": "{{ accept_button_text | replace: '"' , '\"' }}", "change_cookies_text": "{{ change_cookies_text | replace: '"' , '\"' }}", "text": "{{ text | replace: '"' , '\"' }}", "strict_cookies_checkbox": "{{ strict_cookies_checkbox | replace: '"' , '\"' }}", "strict_cookies_text": "{{ strict_cookies_text | replace: '"' , '\"' }}", "analytics_cookies_checkbox": "{{ analytics_cookies_checkbox | replace: '"' , '\"' }}", "analytics_cookies_text": "{{ analytics_cookies_text | replace: '"' , '\"' }}", "marketing_cookies_checkbox": "{{ marketing_cookies_checkbox | replace: '"' , '\"' }}", "marketing_cookies_text": "{{ marketing_cookies_text | replace: '"' , '\"' }}", "functionality_cookies_checkbox": "{{ functionality_cookies_checkbox | replace: '"' , '\"' }}", "functionality_cookies_text": "{{ functionality_cookies_text | replace: '"' , '\"' }}", "popup_header": "{{ popup_header | replace: '"' , '\"' }}", "dismiss_button_text": "{{ dismiss_button_text | replace: '"' , '\"' }}", "accept_selected_button_text": "{{ accept_selected_button_text | replace: '"' , '\"' }}", "accept_all_button_text": "{{ accept_all_button_text | replace: '"' , '\"' }}", "data_collection_text": "{{ data_collection_text | replace: '"' , '\"' }}", "gt_translate_keys":[{"key":"data_collection_text","format":"html"},"privacy_policy_text","accept_button_text","text","strict_cookies_checkbox","strict_cookies_text","analytics_cookies_checkbox","analytics_cookies_text","marketing_cookies_checkbox","marketing_cookies_text","functionality_cookies_checkbox","functionality_cookies_text","popup_header","dismiss_button_text","accept_selected_button_text","accept_all_button_text"] } }; window.isense_gdpr_privacy_policy_text = final_JSON.all_txt.privacy_policy_text; window.isense_gdpr_accept_button_text = final_JSON.all_txt.accept_button_text; window.isense_gdpr_change_cookies_text = final_JSON.all_txt.change_cookies_text; window.isense_gdpr_text = final_JSON.all_txt.text; window.isense_gdpr_strict_cookies_checkbox = final_JSON.all_txt.strict_cookies_checkbox; window.isense_gdpr_strict_cookies_text = final_JSON.all_txt.strict_cookies_text; window.isense_gdpr_analytics_cookies_checkbox = final_JSON.all_txt.analytics_cookies_checkbox; window.isense_gdpr_analytics_cookies_text = final_JSON.all_txt.analytics_cookies_text; window.isense_gdpr_marketing_cookies_checkbox = final_JSON.all_txt.marketing_cookies_checkbox; window.isense_gdpr_marketing_cookies_text = final_JSON.all_txt.marketing_cookies_text; window.isense_gdpr_functionality_cookies_checkbox = final_JSON.all_txt.functionality_cookies_checkbox; window.isense_gdpr_functionality_cookies_text = final_JSON.all_txt.functionality_cookies_text; window.isense_gdpr_popup_header = final_JSON.all_txt.popup_header; window.isense_gdpr_dismiss_button_text = final_JSON.all_txt.dismiss_button_text; window.isense_gdpr_accept_selected_button_text = final_JSON.all_txt.accept_selected_button_text; window.isense_gdpr_accept_all_button_text = final_JSON.all_txt.accept_all_button_text; window.isense_gdpr_data_collection_text = final_JSON.all_txt.data_collection_text; </script>
Here is how the added script looks like
Once you have gone through the steps mentioned above, the whole content of your store will be translated.
Here is how the translated to German Cookie Bar and Preferences Popup look like
The Compliance pages are also translated, as well as the additional messages when submitting any request.
In order to help you with the translation process, we have created a video tutorial showing each one of the steps explained in this article.
That's that for translating the GDPR/CCPA app by using Gtranslate.
If you have any questions regarding the translation of our app, feel free to contact us via chat or email.