Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

magento 2 translate js

require([
'jquery', // jquery Library
'jquery/ui', // Jquery UI Library
'mage/translate' // Magento text translate (Validation message translte as per language)
], function($){ 
    $(window).load(function() {
        alert($.mage.__('Enter Your message here'));
    });
});
Source by magento.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #magento #translate #js
ADD COMMENT
Topic
Name
3+7 =