PHP code example of styleflashernewmedia / mage2-locale-de-de
1. Go to this page and download the library: Download styleflashernewmedia/mage2-locale-de-de library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
styleflashernewmedia / mage2-locale-de-de example snippets
bash
rm pub/static/frontend/Magento/luma/de_DE/js-translation.json
php bin/magento setup:static-content:deploy de_DE
php bin/magento setup:upgrade
rm -rf var/di
php bin/magento setup:di:compile
bash
composer c/frontend/Magento/luma/de_DE/js-translation.json
php bin/magento setup:static-content:deploy de_DE
html
<script type="text/x-magento-init">
{ "[data-role=tocart-form], .form.map.checkout": {
"catalogAddToCart": {
"addToCartButtonTextDefault": " echo __('Add to Cart');
javascript
submitHandler: function (form) {
var widget = $(form).catalogAddToCart({
bindSubmit: false,
"addToCartButtonTextDefault": " echo __('Add to Cart');