Posts

Showing posts from 2021

Magento 2 - How to generate translation strings for your magento project

If you have want to create a multi-language store then you may require to translate all English strings into the language of your choice. For this you will need accumulate all of the eligible strings for translation into a CSV file. In this article we will discuss how to generate this list of strings from your Magento project which are eligible for translations. Magento allows the list generation with following command: For Whole Project: php bin/magento i18n:collect-phrases --magento -o translations.csv cat translations.csv For A Particular Module: php bin/magento i18n:collect-phrases path/to/my/module -o translations.csv cat translations.csv Thenafter, this CSV file (translations.csv in above example) can be translated either manually or using third party translator extensions like Qordoba.

Elastic Search - How to install and manage multiple versions of elastic search

It is possible to install and manage multiple versions of elastic search using an Elastic search version Manager. You can simply follow below steps to install EVM and start Elastic search with your desired version: STEPS sudo curl -o /usr/local/bin/evm https://raw.githubusercontent.com/duydo/evm/master/evm sudo chmod +x /usr/local/bin/evm evm install 7.4.0 /** You can replace 7.4.0 with your desired elastic search version **/ evm install 5.4.0 /** You can replace 5.4.0 with your desired elastic search version **/ evm use 7.4.0 /** You can replace 7.4.0 with your desired elastic search version **/ evm start curl http://localhost:9200 If you want to install another version, then you can stop the EVM and install another version in the similar manner. NOTE: For this Tutorial we have used Duydo EVM which is available here: https://github.com/duydo/evm to download and run elasticsearch version 7.4.0.

Xdebug - PHPStorm - Ubuntu: How to configure Xdebug on Ubuntu for PHPStorm

Image
For this illustration we are using PHP7.3 Find the path of your PHP ini files by opening the console and running following command: php --ini In your root folder create a new file using following command and generate Phpinfo file: sudo vi phpinfo.php Now in your browser run: http://localhost/phpinfo.php . Copy the entire output from this page and paste it into https://xdebug.org/wizard This will give you the download link to xdebug. Now open your console and run below commands: Check the path against "Scan the additional .ini files in". In most cases the path would look something like "/usr/local/etc/php/7.3/conf.d" sudo vi /usr/local/etc/php/7.3/conf.d/ext-xdebug.ini Now in your PHPStorm perform below steps: Click on PHPStorm > Preferences > Languages & Frameworks > PHP > Debug Under Xdebug > Change "Debug Port" to "9001" and select "Can accept external connections Click on Apply Yo