Magento2-Translation not working in js files The Next CEO of Stack OverflowHow to translate js error message or text in Magento 2Magento 2 Translations not workingTranslation not working wellMagento 2 - translating problem in JS templatesHow to translate message: Welcome, Name_User!Magento 2: Cacheable false for specific block not workingJavascript translation not working properlyMagento 2: Initialize calendar widget inside payment uiComponentAdd jquery dependant js via moduleMagento 2 JS Translation Not WorkingTranslation files for different stores of the same languageMagento 2 checkout page keeps on loading.In console,$.event.props is undefined in jquery.mobile.custom.js:44:2.How to clear that?

Customer Requests (Sometimes) Drive Me Bonkers!

Apart from "berlinern", do any other German dialects have a corresponding verb?

The King's new dress

Which organization defines CJK Unified Ideographs?

How should I support this large drywall patch?

How easy is it to start Magic from scratch?

What do "high sea" and "carry" mean in this sentence?

Can a single photon have an energy density?

I believe this to be a fraud - hired, then asked to cash check and send cash as Bitcoin

Is it safe to use c_str() on a temporary string?

Increase performance creating Mandelbrot set in python

Is it okay to store user locations?

How can I get through very long and very dry, but also very useful technical documents when learning a new tool?

Go Pregnant or Go Home

How to write the block matrix in LaTex?

What's the point of interval inversion?

Whats the best way to handle refactoring a big file?

Implement the Thanos sorting algorithm

Why did we only see the N-1 starfighters in one film?

How to be diplomatic in refusing to write code that breaches the privacy of our users

What can we do to stop prior company from asking us questions?

How to use tikz in fbox?

How to count occurrences of text in a file?

How do I get the green key off the shelf in the Dobby level of Lego Harry Potter 2?



Magento2-Translation not working in js files



The Next CEO of Stack OverflowHow to translate js error message or text in Magento 2Magento 2 Translations not workingTranslation not working wellMagento 2 - translating problem in JS templatesHow to translate message: Welcome, Name_User!Magento 2: Cacheable false for specific block not workingJavascript translation not working properlyMagento 2: Initialize calendar widget inside payment uiComponentAdd jquery dependant js via moduleMagento 2 JS Translation Not WorkingTranslation files for different stores of the same languageMagento 2 checkout page keeps on loading.In console,$.event.props is undefined in jquery.mobile.custom.js:44:2.How to clear that?










0















I was trying to make translation in JS files.



I have tried



  • 1


require([
'jquery',
'jquery/ui',
'mage/translate'
], function($)
$(window).load(function()
alert($.mage.__('Your Message'));
);
);



  • 2


<?php echo __('Create Backup') ?>



But nothing worked. It's working fine for strings added in php code.










share|improve this question
























  • check this link maybe any one answer solve your issue

    – Hitesh
    Oct 26 '18 at 12:43











  • Hi @Hit's I have gone through the link and tried.Nothing helps.

    – anil
    Oct 30 '18 at 12:21











  • But as per my link, it should work, maybe you doing something wrong, did you got any errors in console/var/log folder?

    – Hitesh
    Oct 30 '18 at 12:24











  • I haven't got any errors @Hit's

    – anil
    Oct 30 '18 at 12:28






  • 1





    Thanks for the link @Pinky_P , I'll look,try this and get back to you.

    – anil
    Feb 7 at 11:59















0















I was trying to make translation in JS files.



I have tried



  • 1


require([
'jquery',
'jquery/ui',
'mage/translate'
], function($)
$(window).load(function()
alert($.mage.__('Your Message'));
);
);



  • 2


<?php echo __('Create Backup') ?>



But nothing worked. It's working fine for strings added in php code.










share|improve this question
























  • check this link maybe any one answer solve your issue

    – Hitesh
    Oct 26 '18 at 12:43











  • Hi @Hit's I have gone through the link and tried.Nothing helps.

    – anil
    Oct 30 '18 at 12:21











  • But as per my link, it should work, maybe you doing something wrong, did you got any errors in console/var/log folder?

    – Hitesh
    Oct 30 '18 at 12:24











  • I haven't got any errors @Hit's

    – anil
    Oct 30 '18 at 12:28






  • 1





    Thanks for the link @Pinky_P , I'll look,try this and get back to you.

    – anil
    Feb 7 at 11:59













0












0








0








I was trying to make translation in JS files.



I have tried



  • 1


require([
'jquery',
'jquery/ui',
'mage/translate'
], function($)
$(window).load(function()
alert($.mage.__('Your Message'));
);
);



  • 2


<?php echo __('Create Backup') ?>



But nothing worked. It's working fine for strings added in php code.










share|improve this question
















I was trying to make translation in JS files.



I have tried



  • 1


require([
'jquery',
'jquery/ui',
'mage/translate'
], function($)
$(window).load(function()
alert($.mage.__('Your Message'));
);
);



  • 2


<?php echo __('Create Backup') ?>



But nothing worked. It's working fine for strings added in php code.







magento2 language translate js-translation






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 23 mins ago









Teja Bhagavan Kollepara

3,01241949




3,01241949










asked Oct 26 '18 at 12:41









anilanil

1069




1069












  • check this link maybe any one answer solve your issue

    – Hitesh
    Oct 26 '18 at 12:43











  • Hi @Hit's I have gone through the link and tried.Nothing helps.

    – anil
    Oct 30 '18 at 12:21











  • But as per my link, it should work, maybe you doing something wrong, did you got any errors in console/var/log folder?

    – Hitesh
    Oct 30 '18 at 12:24











  • I haven't got any errors @Hit's

    – anil
    Oct 30 '18 at 12:28






  • 1





    Thanks for the link @Pinky_P , I'll look,try this and get back to you.

    – anil
    Feb 7 at 11:59

















  • check this link maybe any one answer solve your issue

    – Hitesh
    Oct 26 '18 at 12:43











  • Hi @Hit's I have gone through the link and tried.Nothing helps.

    – anil
    Oct 30 '18 at 12:21











  • But as per my link, it should work, maybe you doing something wrong, did you got any errors in console/var/log folder?

    – Hitesh
    Oct 30 '18 at 12:24











  • I haven't got any errors @Hit's

    – anil
    Oct 30 '18 at 12:28






  • 1





    Thanks for the link @Pinky_P , I'll look,try this and get back to you.

    – anil
    Feb 7 at 11:59
















check this link maybe any one answer solve your issue

– Hitesh
Oct 26 '18 at 12:43





check this link maybe any one answer solve your issue

– Hitesh
Oct 26 '18 at 12:43













Hi @Hit's I have gone through the link and tried.Nothing helps.

– anil
Oct 30 '18 at 12:21





Hi @Hit's I have gone through the link and tried.Nothing helps.

– anil
Oct 30 '18 at 12:21













But as per my link, it should work, maybe you doing something wrong, did you got any errors in console/var/log folder?

– Hitesh
Oct 30 '18 at 12:24





But as per my link, it should work, maybe you doing something wrong, did you got any errors in console/var/log folder?

– Hitesh
Oct 30 '18 at 12:24













I haven't got any errors @Hit's

– anil
Oct 30 '18 at 12:28





I haven't got any errors @Hit's

– anil
Oct 30 '18 at 12:28




1




1





Thanks for the link @Pinky_P , I'll look,try this and get back to you.

– anil
Feb 7 at 11:59





Thanks for the link @Pinky_P , I'll look,try this and get back to you.

– anil
Feb 7 at 11:59










0






active

oldest

votes












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
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f248047%2fmagento2-translation-not-working-in-js-files%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































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.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f248047%2fmagento2-translation-not-working-in-js-files%23new-answer', 'question_page');

);

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







Popular posts from this blog

Can not update quote_id field of “quote_item” table magento 2Magento 2.1 - We can't remove the item. (Shopping Cart doesnt allow us to remove items before becomes empty)Add value for custom quote item attribute using REST apiREST API endpoint v1/carts/cartId/items always returns error messageCorrect way to save entries to databaseHow to remove all associated quote objects of a customer completelyMagento 2 - Save value from custom input field to quote_itemGet quote_item data using quote id and product id filter in Magento 2How to set additional data to quote_item table from controller in Magento 2?What is the purpose of additional_data column in quote_item table in magento2Set Custom Price to Quote item magento2 from controller

Magento 2 disable Secret Key on URL's from terminal The Next CEO of Stack OverflowMagento 2 Shortcut/GUI tool to perform commandline tasks for windowsIn menu add configuration linkMagento oAuth : Generating access token and access secretMagento 2 security key issue in Third-Party API redirect URIPublic actions in admin controllersHow to Disable Cache in Custom WidgetURL Key not changing in Magento 2Product URL Key gets deleted when importing custom options - Magento 2Problem with reindex terminalMagento 2 - bin/magento Commands not working in Cpanel Terminal

Aasi (pallopeli) Navigointivalikko