Unfortunatelly in my case I cannot uncheck Locale setting, it is disabled. Could you please give me some help how to associate english language to English store. Thx

enter image description here

  • What is your users role? if you are not login with admin then check roles and permission – Birjitsinh Zala Jan 4 '18 at 4:58

This can happen when your site is production mode because if the locale is changed and there has been no static content generated for that locale there will be no assets available. The frontend would request assets from a location that would not exist and all styles and scripts would 404, which obviously isn't ideal.

You can see the disabling happening here: https://github.com/magento/magento2/blob/2.2.6/app/code/Magento/Backend/etc/adminhtml/di.xml#L149-L155. The class ConcealInProductionWithoutScdOnDemand is disabling the field if "Static Content On Demand" is not enabled (I'm not exactly sure where this feature is enabled if I'm honest) preventing you from potentially breaking the site.

If you are sure you have static content succesfully generated for the locale you're changing to either change this via one of these methods:

  • Change the value using the CLI with bin/magento config:set
  • Change the value directly in the DB
  • Force the value using devtools in the browser

For me, I'll need to introduce the change at the start of my deploy process. It's up to you to establish when to change the value based on your process.

  • To add to the conversation: to deploy static content for a specific language, do the following bin/magento setup:static-content:deploy [language code: xx_XX] e.g. bin/magento setup:static-content:deploy nl_NL en_US will deploy for Dutch and English (US) languages. It didn't fix the issue of the locale not being available though. I changed it using devtools and removed disabled="disabled" attribute from the input field. Then clicked save. Done! :) – Daan van den Bergh Nov 4 '19 at 7:30

Change to developer mode using bellow command, change your settings, save, and back to production, and deploy again using your new locals.

change to developer

php bin/magento deploy:mode:set developer --skip-compilation

back to productin

php bin/magento deploy:mode:set production --skip-compilation

deploy (exemple)

php bin/magento setup:static-content:deploy en_GB
  • Warning: include(/home/ecommerce/magento/releases/20190308150254/vendor/composer/../../generated/code/Magento/Framework/App/ResourceConnection/Proxy.php): failed to open stream: No such file or directory in (...)/vendor/composer/ClassLoader.php on line 444 after executing: php bin/magento deploy:mode:set production --skip-compilation – dudzio Mar 8 '19 at 15:20

So far I didn't go deep and debug the cause. But as quick workaround you can use your browser's developer console and remove the "disabled" attribute from the checkbox "Use Website". This allows you to uncheck it, select a locale and save the configuration.

This does not solve the problem itself, but worked for me to set the locale.

  • As you are unlikely to change locale setting on a production environment often I find this a good solution. Kudos – Zankar Sep 14 '20 at 9:42

There may be some JS error possibly. You need to delete you pub/static folder and regenerate the static files. As you see in screen-shot, I'm able to make change in locale of my English store

enter image description here

  • Why all the hate for this answer? – vitoriodachef Jun 7 '19 at 7:42
  • @vitoriodachef because it's not correct. Clearing the pub/static folder won't make any difference to the problem OP was having. – jsims281 Jul 29 '19 at 9:47

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.