Magento 2 – Setup:static-content:deploy Issue with Locale

localemagento2static-content-deploy

I have enabled Production mode, and when I run setup:static-content:deploy, it creates two folders – en_AU and en_US.

In pub/static/frontend/mytheme/, en_US folder has all nessesary files generated, and en_AU folder has only one .js file generated.

When I refresh my front-end, I can see all files including css and js are loaded from en_AU folder, but since this folder is emtpy, so my front-end is not displaying correctly. Then I need to manually copy everything from en_US to en_AU to make front-end working.

Why does system creates two folders with one has all contents, and another empty, but front-end is reading from the empty folder.

How can I fixed this issue ?

Best Answer

Make sure you've selected English (United States) in your locale settings: Stores > Configuration > General > Locale Options

setup:static-content:deploy by default deploys en_US

If you'd like to use en_AU, change your Locale Settings in the admin to English (Australia) and run setup:static-content:deploy en_AU

Related Topic