5

Currently in Stores > All Stores I have one store view (Dutch).

When I do command php bin/magento setup:static-content:deploy it generates files for en_US. I know with the command php bin/magento setup:static-content:deploy nl_NL it's generating files for nl_NL.

But what is the advantage or purpose of this? Why do I have to do this exactly?

1

To be short in production mode you'll have to use php bin/magento setup:static-content:deploy nl_NL for example if you have installed theme with localization files. If you use this command without localization parameter - your static resources will be missing partially on your site if your system language is Dutch.

Here is what magento docs says:

Static view files deployment is affected by Magento modes as follows:

Developer mode: Magento generates them on demand, but the rest are cached in a file for speed of access. Default and production modes: Static files are not generated or cached.

You must write static view files to the Magento file system manually using the command discussed in this topic; after that, you can restrict permissions to limit your vulnerabilities and to prevent accidental or malicious overwriting of files. You must write static view files to the Magento file system manually using the command discussed in this topic; after that, you can restrict permissions to limit your vulnerabilities and to prevent accidental or malicious overwriting of files.

See "Overview" http://devdocs.magento.com/guides/v2.1/config-guide/cli/config-cli-subcommands-static-view.html

Try to enable production mode bin/magento deploy:mode:set production and research how site deployment works.

  • ok thanks. Can you give an example of - theme with localization files - What files, kind of files exactly do you mean? – meez Jun 29 '16 at 15:27
  • I don't know such a free theme. But have a look at /magento-catalog/i18n/en_us.csv. Copy it and rename it by your localization code and implement into your module or theme, then translate it and run static deployment command. See for more details devdocs.magento.com/guides/v2.0/frontend-dev-guide/translations/… – white-imp Jun 29 '16 at 15:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.