View Single Post
  #1  
Old 09-29-2022, 09:46 AM
 
Ed B. Ed B. is offline
 

X-Adept
  
Join Date: Apr 2016
Posts: 446
 

Default GDPR module : how to translate the label {Privacy Policy}?

Hi, I am having difficulties with translating different labels.


Some of them can be done from the admin menu, Store Setup -> translation


Others can be done simply by rewriting the contents in the admin menu, with the chosen language.


Still others, have to be done via the database. For example, I figured that order status, payment status could be translated by inserting appropriate rows into appropriate tables.


However, this one, the label "privacy Policy" that shows up in the profile page beats me.



Basically it comes from


customer/modules/XC/GDPR/form_field/checkbox/cookies_consent.twig
(X-cart version 5.4.1.35, GDPR module version 5.4.2.3)



and the code is


Code:
{% if not this.getParam('fieldOnly') and this.hasHelp() %} <div class="cookie-data"> <h4>Cookies</h4> <p> {{ t(this.getParam('help'))|raw }} <a href="{{ this.getGdprLabelURL()|raw }}" target=\"_blank\">{{ t('Privacy policy') }}</a> </p> </div> {% endif %} <div class="gdpr-checkbox"> <div class="{{ this.getLabelContainerClass() }}"> <label for="{{ this.getFieldId() }}"> {{ this.getFormattedLabel()|raw }} {% if this.hasLabelHelp() %} {{ widget('\\XLite\\View\\Tooltip', text=t(this.getParam('labelHelp')), helpWidget=this.getParam('labelHelpWidget'), isImageTag='true', className='help-icon') }} {% endif %} </label> </div> <div class="{{ this.getValueContainerClass() }}"> {% include this.getDir() ~ '/' ~ this.getFieldTemplate() %} {% if this.getParam('comment') %} <div class="form-field-comment {{ this.getFieldId() }}-comment">{{ t(this.getParam('comment')) }}</div> {% endif %} {% if this.getFormFieldJSData() %}{{ this.displayCommentedData(this.getFormFieldJSData()) }}{% endif %} {% if this.getInlineJSCode() %} <script>{{ this.getInlineJSCode() }}</script> {% endif %} </div> </div>
I think I went through all the tables with suffix "translations" but I have had no success so far. Would anyone have how to solve this ? Thank you very much in advance.
__________________
X-cart 5.2.12, php 5.6
Ed from Grenoble, France
Reply With Quote