Step 1 : I run below command for generating translation dictionary
magento i18n:collect-phrases -o "/var/www/html/magento2/es_ES.csv" -m /var/www/html/magento2/
It runs successfully with the below message "Dictionary successfully processed" and generates "es_ES.csv" file in the magento root directory.
*Step 2: You have to translate this es_ES.csv, get a translated es_ES.csv file or get the latest from the crowdin-project (43% translation)
*
Step 3 : I run below command to create language package.
magento i18n:pack -d /var/www/html/magento2/es_ES.csv . es_ES
Step 4: Run the commands:
from document root:
find . -name js-translation.json -exec rm -rf {} ;
php bin/magento i18n:pack --mode=replace -d var/source_nl_NL.csv nl_NL
php bin/magento setup:static-content:deploy en_US nl_NL
php bin/magento indexer:reindex
php bin/magento cache:clean
php bin/magento cache:flush
Please also have look at:
http://www.vanderboon.net/wiki/Install_Magento_Crowdin_Translation
http://www.vanderboon.net/wiki/Install_Test_Magento_2_Translation