Is there any specific code I can insert to have this sentence show up on my website in French?

I am having trouble with a snippet of code in my French website. I want to ensure that the text "Join the Movement" appears in French on the site. While everything else is being translated correctly, I need help figuring out what additional code I can add to ensure this specific line is displayed in the desired language.

<div class="hero-unit">
  <div class="container">
    <div class="row">
      <div class="col-sm-12">
        {% if hero_graphic or hero_text %}
          <div class="hero-text">
            {% if options.pledge_now_url %}
            <div class="hero-pledge-button">
              <a href="{{options.pledge_now_url}}" style="background-image: url('{{site.theme.link}}/assets/dist/img/arrow-right.png');font-size: 22px;">Rejoignez le Mouvement</a>
            </div>
            {% endif %}

{% if constant('ICL_LANGUAGE_CODE') == 'fr' %}
            <style type='text/css'>@media (min-width: 769px) { .hero-unit .hero-text-plain { font-size: 60px; } .hero-unit .hero-text-formatted .line { font-size: 30px; }}</style>
            {% endif %}

            {% if hero_text and post.get_field('hero_text_smart_formatting') %}
              <div class="hero-text-formatted">
                {{ hero_text|smart_hero_formatting }}
              </div>
            {% elseif hero_graphic and hero_text %}
              <img src="{{hero_graphic['url']}}" alt="{{hero_text}}" />
            {% elseif hero_graphic %}
              <img src="{{hero_graphic['url']}}" alt="{{hero_graphic["alt"]}}" />
            {% elseif hero_text %}
              <span class="hero-text-plain">{{hero_text}}</span>
            {% endif %}
          </div>
        {% endif %}
      </div>
    </div>
  </div>
</div>

Answer №1

It's hard to say if the translation is accurate, but based on my understanding of your issue, the following adjustment should fix it.

<div class="hero-unit">
<div class="container">
<div class="row">
  <div class="col-sm-12">
    {% if hero_graphic or hero_text %}
      <div class="hero-text">
        {% if options.pledge_now_url %}
        <div class="hero-pledge-button">
          {% if constant('ICL_LANGUAGE_CODE') == 'fr' %} 
            <a href="{{options.pledge_now_url}}" style="background-image: url('{{site.theme.link}}/assets/dist/img/arrow-right.png');font-size: 22px;">Join the Movement</a>
          {% else %}
            <a href="{{options.pledge_now_url}}" style="background-image: url('{{site.theme.link}}/assets/dist/img/arrow-right.png');font-size: 22px;">Join the Movement</a>
          {% endif %}
        </div>
        {% endif %}
        {% if constant('ICL_LANGUAGE_CODE') == 'fr' %}
        <style type='text/css'>@media (min-width: 769px) { .hero-unit .hero-text-plain { font-size: 60px; } .hero-unit .hero-text-formatted .line { font-size: 30px; }}</style>
        {% endif %}

        {% if hero_text and post.get_field('hero_text_smart_formatting') %}
          <div class="hero-text-formatted">
            {{ hero_text|smart_hero_formatting }}
          </div>
        {% elseif hero_graphic and hero_text %}
          <img src="{{hero_graphic['url']}}" alt="{{hero_text}}" />
        {% elseif hero_graphic %}
          <img src="{{hero_graphic['url']}}" alt="{{hero_graphic["alt"]}}" />
        {% elseif hero_text %}
          <span class="hero-text-plain">{{hero_text}}</span>
        {% endif %}
      </div>
    {% endif %}
  </div>
</div>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Enabling client-side access to collections without the need for meteor startup

Whenever I define my Meteor collections on the server and attempt to access them in the client without being within any of the predefined Meteor methods such as rendered, events, created, or helpers, I consistently encounter an error stating Meteor colle ...

A step-by-step guide to building an API page with Python

Hello everyone! I am just starting out with Vue.js and Python, and I have a question for you. My task is to create a basic webpage using Vue.js on the front end and Python on the backend, with Heidi SQL as my database. My team has requested that I create ...

Using Bootstrap, jQuery, and PHP to dynamically load input fields in a modal window

I am looking to dynamically load input fields in a modal window using PHP. While researching, I came across suggestions to utilize AJAX for this purpose. However, I have limited knowledge about AJAX. The plan is as follows: 1) When the user clicks on the ...

Transforming ASP.NET MVC IEnumerable view model into a JSON array of elements

My goal is to develop a dynamic calendar in ASP.NET MVC that pulls event data from a database to populate it. Right now, the calendar is set up to read a json array of objects, but I am facing an issue with converting my ViewModel data into a format that t ...

The console displays the progress percentage, but it is not visible within the HTML

I am trying to troubleshoot an issue where file uploading progress is not displaying in the HTML, even though it is visible in the console. What could be causing this behavior? When I use console.log(this.progress), the progress is shown in the console bu ...

What is the best way to display multiple canvases on one page?

Is it possible to draw multiple canvases in a single page using this code? I have successfully drawn a single canvas using the provided code. For each canvas, I have different y data and I need to display 6 canvases per page. How can I achieve this on a ...

Issues with AngularJS's ng-options functionality are hindering its performance

Having trouble with ng-options not working as expected? Despite following the required structure, it seems like you're getting the same result. Don't worry, I've been researching the topic endlessly and could use some help from you guys. HT ...

AngularJS flip card animation

Exploring the new AngularJS method for animations during page transitions, I am keen on integrating a card flip effect (resembling http://jsfiddle.net/nicooprat/GDdtS/) body { background: #ccc; } .flip { -webkit-perspective: 800; width: 400px; height: ...

Exploring unique forms with the turfjs polygon difference() function

While implementing the difference() function for my polygon map, I encountered a problem where unexpected shapes would appear or disappear when zooming in on the map. These shapes should not be there. The polygons involved are of type MultyPolygon and Poly ...

When an attempt to make a POST request using fetch() is made, a TypeError: Failed to fetch error is immediately thrown instead of

My front-end form is posting data using the fetch() function. Everything works fine and I get the correct response from the server when it runs smoothly without any interruptions. However, when I debug the server endpoint, it throws a TypeError: failed to ...

Retrieving the source code of a specific http URL using JavaScript

Is it feasible to obtain the source code of a webpage using JavaScript on the client side? Perhaps with AJAX? However, can I ensure that the server from which I am downloading the URL sees the client's IP address? Using AJAX could potentially reveal ...

"Troubleshooting: State array in ReactJS/NextJS not rendering correctly following setState

I am facing challenges with rendering my objects using .map() within React / NextJS. Within my code, I have a function where I retrieve images from Firebase Cloud Storage as shown below: getImages = () => { let firebase = loadFirebase() ...

Text alignment issue in Material UI Data Grid Component

Currently, I am working with a DataGrid component nested inside a div that is enclosed within a Box component. I am facing issues in centering the content of the DataGrid and styling the header text. The code snippet I'm using is: Blockquote <B ...

JavaScript: A guide to substituting specific characters in a string

I attempted to extract a list of names from a URL as URL parameters. var url_arrays = [],url_param; var url = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); for (var i = 0; i < url.length; i++) ...

Having trouble sending a JavaScript variable to PHP via AJAX

I am attempting to pass a JavaScript variable (a value obtained when a user chooses a random option from a select dropdown menu) into a PHP variable in order to check the attributes of the selected option in my database. The option corresponds to the name ...

Issues arise with transferring React component between different projects

My goal is to develop a React component that serves as a navigation bar. This particular component is intended to be imported from a separate file into my App.js. Currently, the component is designed to simply display a 'Hello world' paragraph, ...

Displaying identification when clicked using JavaScript

Hey there, I've been searching for an answer to my issue but haven't had any luck so far. Can anyone assist me? I have a group of links that display specific ids when clicked. It's working fine, but one link should actually trigger the disp ...

Is there a way to keep the input field data in my form in next js persist even after the page refreshes?

I am currently developing a form in Next.js and I need the data to persist even after the page is refreshed or reloaded. Unfortunately, local storage does not work with Next.js, so I am exploring other alternatives. Every time I try to use local storage, ...

Is it a graphics card malfunction or a coding complication? Delving into THREE.JS WebGL

Recently, I created a cool scene using three.js that was running perfectly until today. Strangely, without any changes to the code, I started encountering an error in every major browser - Chrome, Firefox, and Edge. The error message I am seeing is: THREE. ...

Finding and removing the replicated keys within a JSON array while also retrieving the corresponding JSON path

I have a JSON object that looks like this: {"response":{"result":{"Leads":{"row":[{"LEADID":"849730000000063017","SMOWNERID":"849730000000061001"},{"LEADID":"849730000000063015","SMOWNERID":"849730000000061001","HIII":"hello"},{"LEADID":"84973000000006 ...