What code can I add to make this sentence appear on my French site?
I have a snippet of code that I need help with. I am looking to make sure that this Join the Movement line shows up in French on my French website. Right now everything else is being translated but I wanted to know what code can I add to make sure this shows up in the other 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;">Join the Movement</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>
javascript
add a comment |
I have a snippet of code that I need help with. I am looking to make sure that this Join the Movement line shows up in French on my French website. Right now everything else is being translated but I wanted to know what code can I add to make sure this shows up in the other 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;">Join the Movement</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>
javascript
are you saying you want it to sometimes be French and sometimes English, based on the constant('ICL_LANGUAGE_CODE') ?
– Kelvin
Nov 22 '18 at 21:48
Please also tag the server framework. ASP? It has nothing to do with JavaScript
– mplungjan
Nov 24 '18 at 10:30
add a comment |
I have a snippet of code that I need help with. I am looking to make sure that this Join the Movement line shows up in French on my French website. Right now everything else is being translated but I wanted to know what code can I add to make sure this shows up in the other 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;">Join the Movement</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>
javascript
I have a snippet of code that I need help with. I am looking to make sure that this Join the Movement line shows up in French on my French website. Right now everything else is being translated but I wanted to know what code can I add to make sure this shows up in the other 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;">Join the Movement</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>
<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;">Join the Movement</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>
<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;">Join the Movement</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>
javascript
javascript
asked Nov 22 '18 at 21:28
Nature15Nature15
32
32
are you saying you want it to sometimes be French and sometimes English, based on the constant('ICL_LANGUAGE_CODE') ?
– Kelvin
Nov 22 '18 at 21:48
Please also tag the server framework. ASP? It has nothing to do with JavaScript
– mplungjan
Nov 24 '18 at 10:30
add a comment |
are you saying you want it to sometimes be French and sometimes English, based on the constant('ICL_LANGUAGE_CODE') ?
– Kelvin
Nov 22 '18 at 21:48
Please also tag the server framework. ASP? It has nothing to do with JavaScript
– mplungjan
Nov 24 '18 at 10:30
are you saying you want it to sometimes be French and sometimes English, based on the constant('ICL_LANGUAGE_CODE') ?
– Kelvin
Nov 22 '18 at 21:48
are you saying you want it to sometimes be French and sometimes English, based on the constant('ICL_LANGUAGE_CODE') ?
– Kelvin
Nov 22 '18 at 21:48
Please also tag the server framework. ASP? It has nothing to do with JavaScript
– mplungjan
Nov 24 '18 at 10:30
Please also tag the server framework. ASP? It has nothing to do with JavaScript
– mplungjan
Nov 24 '18 at 10:30
add a comment |
1 Answer
1
active
oldest
votes
I'm not sure if the translation is correct, but as far as I understood your problem, the following modification should solve 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;">Joignez-vous au mouvement</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>
Thank you so much that fixed my problem!!!
– Nature15
Nov 23 '18 at 14:37
A ternary or better: a lookup table would save a lot of code.
– mplungjan
Nov 24 '18 at 7:38
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53438154%2fwhat-code-can-i-add-to-make-this-sentence-appear-on-my-french-site%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I'm not sure if the translation is correct, but as far as I understood your problem, the following modification should solve 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;">Joignez-vous au mouvement</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>
Thank you so much that fixed my problem!!!
– Nature15
Nov 23 '18 at 14:37
A ternary or better: a lookup table would save a lot of code.
– mplungjan
Nov 24 '18 at 7:38
add a comment |
I'm not sure if the translation is correct, but as far as I understood your problem, the following modification should solve 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;">Joignez-vous au mouvement</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>
Thank you so much that fixed my problem!!!
– Nature15
Nov 23 '18 at 14:37
A ternary or better: a lookup table would save a lot of code.
– mplungjan
Nov 24 '18 at 7:38
add a comment |
I'm not sure if the translation is correct, but as far as I understood your problem, the following modification should solve 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;">Joignez-vous au mouvement</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>
I'm not sure if the translation is correct, but as far as I understood your problem, the following modification should solve 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;">Joignez-vous au mouvement</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>
answered Nov 22 '18 at 22:15
chrisbergrchrisbergr
13125
13125
Thank you so much that fixed my problem!!!
– Nature15
Nov 23 '18 at 14:37
A ternary or better: a lookup table would save a lot of code.
– mplungjan
Nov 24 '18 at 7:38
add a comment |
Thank you so much that fixed my problem!!!
– Nature15
Nov 23 '18 at 14:37
A ternary or better: a lookup table would save a lot of code.
– mplungjan
Nov 24 '18 at 7:38
Thank you so much that fixed my problem!!!
– Nature15
Nov 23 '18 at 14:37
Thank you so much that fixed my problem!!!
– Nature15
Nov 23 '18 at 14:37
A ternary or better: a lookup table would save a lot of code.
– mplungjan
Nov 24 '18 at 7:38
A ternary or better: a lookup table would save a lot of code.
– mplungjan
Nov 24 '18 at 7:38
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53438154%2fwhat-code-can-i-add-to-make-this-sentence-appear-on-my-french-site%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
are you saying you want it to sometimes be French and sometimes English, based on the constant('ICL_LANGUAGE_CODE') ?
– Kelvin
Nov 22 '18 at 21:48
Please also tag the server framework. ASP? It has nothing to do with JavaScript
– mplungjan
Nov 24 '18 at 10:30