Magento 2: Translation is not working in html template using data-bindTranslation not working wellTranslation Not Happen - Magento CE 2.0.1Translate order emailCheckout uiComponent (input field) rendered multiple times: how do I apply viewmodel functionality to current input field only?Magento 2:Get input field text value in js file from template fileWeird translation bug in theme - “SKU” can't be translated, but is a translateable stringMagento2-Translation not working in js filesWhy data bind template is not working on 2.2 or greater?Checkout agreements data-bind is not workingMagento 2: theme translation does not work
Does Nightpack Ambusher's second ability trigger if I cast spells during the end step?
If "more guns less crime", how do gun advocates explain that the EU has less crime than the US?
My cat is a houdini
Why is there a large performance impact when looping over an array over 240 elements?
Do beef farmed pastures net remove carbon emissions?
How to Check all AD userers for "blank" password?
If I animate and control a zombie, does it benefit from Undead Fortitude when it's reduced to 0 HP?
Does EU compensation apply to flights where the departure airport closes check-in counters during protests?
How can I communicate my issues with a potential date's pushy behavior?
How would you translate this? バタコチーズライス
How should I write this passage to make it the most readable?
Why is Python 2.7 still the default Python version in Ubuntu?
How can God warn people of the upcoming rapture without disrupting society?
Corroded Metal vs Magical Armor, should it melt it?
Are those flyers about apartment purchase a scam?
Heating Margarine in Pan = loss of calories?
How can I find an old paper when the usual methods fail?
What is a good class if we remove subclasses?
A continuous water "planet" ring around a star
How do I call a 6-digit Australian phone number with a US-based mobile phone?
The cat ate your input again!
Are employers legally allowed to pay employees in goods and services equal to or greater than the minimum wage?
Is it possible to grow new organs through exposure to radioactivity?
Why aren’t there water shutoff valves for each room?
Magento 2: Translation is not working in html template using data-bind
Translation not working wellTranslation Not Happen - Magento CE 2.0.1Translate order emailCheckout uiComponent (input field) rendered multiple times: how do I apply viewmodel functionality to current input field only?Magento 2:Get input field text value in js file from template fileWeird translation bug in theme - “SKU” can't be translated, but is a translateable stringMagento2-Translation not working in js filesWhy data bind template is not working on 2.2 or greater?Checkout agreements data-bind is not workingMagento 2: theme translation does not work
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have inserted the string to translate into the app/i18n/lg_lG.csv
file.
I run the command to deploy static files, clean cache, but the string is not translated.
The string is located in this file:
vendor/magento/module-checkout/view/frontend/web/template/cart/shipping-estimation.html:12:
<p class="field note" data-bind="text: isVirtual ? $t('Enter your billing address to get a tax estimate.') : $t('Enter your destination to get a shipping estimate.')"></p>
The magento verion is 2.3.1 .
magento2 template knockoutjs language translate
add a comment |
I have inserted the string to translate into the app/i18n/lg_lG.csv
file.
I run the command to deploy static files, clean cache, but the string is not translated.
The string is located in this file:
vendor/magento/module-checkout/view/frontend/web/template/cart/shipping-estimation.html:12:
<p class="field note" data-bind="text: isVirtual ? $t('Enter your billing address to get a tax estimate.') : $t('Enter your destination to get a shipping estimate.')"></p>
The magento verion is 2.3.1 .
magento2 template knockoutjs language translate
In case if you want to try extension for translation magecomp.com/magento-2-google-language-translator.html
– Gaurav Jain
Aug 6 at 6:51
add a comment |
I have inserted the string to translate into the app/i18n/lg_lG.csv
file.
I run the command to deploy static files, clean cache, but the string is not translated.
The string is located in this file:
vendor/magento/module-checkout/view/frontend/web/template/cart/shipping-estimation.html:12:
<p class="field note" data-bind="text: isVirtual ? $t('Enter your billing address to get a tax estimate.') : $t('Enter your destination to get a shipping estimate.')"></p>
The magento verion is 2.3.1 .
magento2 template knockoutjs language translate
I have inserted the string to translate into the app/i18n/lg_lG.csv
file.
I run the command to deploy static files, clean cache, but the string is not translated.
The string is located in this file:
vendor/magento/module-checkout/view/frontend/web/template/cart/shipping-estimation.html:12:
<p class="field note" data-bind="text: isVirtual ? $t('Enter your billing address to get a tax estimate.') : $t('Enter your destination to get a shipping estimate.')"></p>
The magento verion is 2.3.1 .
magento2 template knockoutjs language translate
magento2 template knockoutjs language translate
edited Aug 2 at 8:03
Sameer Bhayani
9475 silver badges21 bronze badges
9475 silver badges21 bronze badges
asked Aug 2 at 7:59
blobblob
1539 bronze badges
1539 bronze badges
In case if you want to try extension for translation magecomp.com/magento-2-google-language-translator.html
– Gaurav Jain
Aug 6 at 6:51
add a comment |
In case if you want to try extension for translation magecomp.com/magento-2-google-language-translator.html
– Gaurav Jain
Aug 6 at 6:51
In case if you want to try extension for translation magecomp.com/magento-2-google-language-translator.html
– Gaurav Jain
Aug 6 at 6:51
In case if you want to try extension for translation magecomp.com/magento-2-google-language-translator.html
– Gaurav Jain
Aug 6 at 6:51
add a comment |
2 Answers
2
active
oldest
votes
Run the following command
rm-rf /var/view_processed pub/static/frontend/Vendor/Custom_theme/lg_lG/js-translations.json
php bin/magento setup:static-content:deploy -f lg_LG
php bin/magento cache:clean
php bin/magento cache:flush
Visit js-translations.json file in browser.
Visit your site.
it doesn't work!
– blob
Aug 2 at 10:18
I manually edited the js-translations.json file! If it is deleted I replace with the old one and it is done!
– blob
Aug 2 at 13:32
add a comment |
Try replacing text:
with i18n:
, this is the translation binding although I don't know how that will work with your inline logic. IMO that is more suited to being in the JS file.
See https://devdocs.magento.com/guides/v2.3/ui_comp_guide/concepts/knockout-bindings.html#i18n for more info
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2fmagento.stackexchange.com%2fquestions%2f284184%2fmagento-2-translation-is-not-working-in-html-template-using-data-bind%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Run the following command
rm-rf /var/view_processed pub/static/frontend/Vendor/Custom_theme/lg_lG/js-translations.json
php bin/magento setup:static-content:deploy -f lg_LG
php bin/magento cache:clean
php bin/magento cache:flush
Visit js-translations.json file in browser.
Visit your site.
it doesn't work!
– blob
Aug 2 at 10:18
I manually edited the js-translations.json file! If it is deleted I replace with the old one and it is done!
– blob
Aug 2 at 13:32
add a comment |
Run the following command
rm-rf /var/view_processed pub/static/frontend/Vendor/Custom_theme/lg_lG/js-translations.json
php bin/magento setup:static-content:deploy -f lg_LG
php bin/magento cache:clean
php bin/magento cache:flush
Visit js-translations.json file in browser.
Visit your site.
it doesn't work!
– blob
Aug 2 at 10:18
I manually edited the js-translations.json file! If it is deleted I replace with the old one and it is done!
– blob
Aug 2 at 13:32
add a comment |
Run the following command
rm-rf /var/view_processed pub/static/frontend/Vendor/Custom_theme/lg_lG/js-translations.json
php bin/magento setup:static-content:deploy -f lg_LG
php bin/magento cache:clean
php bin/magento cache:flush
Visit js-translations.json file in browser.
Visit your site.
Run the following command
rm-rf /var/view_processed pub/static/frontend/Vendor/Custom_theme/lg_lG/js-translations.json
php bin/magento setup:static-content:deploy -f lg_LG
php bin/magento cache:clean
php bin/magento cache:flush
Visit js-translations.json file in browser.
Visit your site.
answered Aug 2 at 8:16
MitroMitro
3167 bronze badges
3167 bronze badges
it doesn't work!
– blob
Aug 2 at 10:18
I manually edited the js-translations.json file! If it is deleted I replace with the old one and it is done!
– blob
Aug 2 at 13:32
add a comment |
it doesn't work!
– blob
Aug 2 at 10:18
I manually edited the js-translations.json file! If it is deleted I replace with the old one and it is done!
– blob
Aug 2 at 13:32
it doesn't work!
– blob
Aug 2 at 10:18
it doesn't work!
– blob
Aug 2 at 10:18
I manually edited the js-translations.json file! If it is deleted I replace with the old one and it is done!
– blob
Aug 2 at 13:32
I manually edited the js-translations.json file! If it is deleted I replace with the old one and it is done!
– blob
Aug 2 at 13:32
add a comment |
Try replacing text:
with i18n:
, this is the translation binding although I don't know how that will work with your inline logic. IMO that is more suited to being in the JS file.
See https://devdocs.magento.com/guides/v2.3/ui_comp_guide/concepts/knockout-bindings.html#i18n for more info
add a comment |
Try replacing text:
with i18n:
, this is the translation binding although I don't know how that will work with your inline logic. IMO that is more suited to being in the JS file.
See https://devdocs.magento.com/guides/v2.3/ui_comp_guide/concepts/knockout-bindings.html#i18n for more info
add a comment |
Try replacing text:
with i18n:
, this is the translation binding although I don't know how that will work with your inline logic. IMO that is more suited to being in the JS file.
See https://devdocs.magento.com/guides/v2.3/ui_comp_guide/concepts/knockout-bindings.html#i18n for more info
Try replacing text:
with i18n:
, this is the translation binding although I don't know how that will work with your inline logic. IMO that is more suited to being in the JS file.
See https://devdocs.magento.com/guides/v2.3/ui_comp_guide/concepts/knockout-bindings.html#i18n for more info
answered Aug 2 at 8:26
Ben CrookBen Crook
10.1k26 silver badges82 bronze badges
10.1k26 silver badges82 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- 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%2fmagento.stackexchange.com%2fquestions%2f284184%2fmagento-2-translation-is-not-working-in-html-template-using-data-bind%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
In case if you want to try extension for translation magecomp.com/magento-2-google-language-translator.html
– Gaurav Jain
Aug 6 at 6:51