X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   GDPR module : how to translate the label {Privacy Policy}? (https://forum.x-cart.com/showthread.php?t=78461)

Ed B. 09-29-2022 09:46 AM

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.

cricstay 09-29-2022 09:20 PM

Re: GDPR module : how to translate the label {Privacy Policy}?
 
For Cricket Facts & Knowledge: https://www.cricstay.com

Ed B. 09-29-2022 11:05 PM

Re: GDPR module : how to translate the label {Privacy Policy}?
 
It turned out that all I had to do was to create a "new" label from admin menu for translations...:oops:


All times are GMT -8. The time now is 04:29 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.