I have changed my local settings in the backend (store->config->general) all to the United Kingdom so my theme looks in the en_GB folder however the admin still looks in the en_US folder after deploying.
This creates a problem when it comes to running 'bin/magento setup:static-content:deploy' as it only deploys it to the en_US folder meaning only the admin displays correctly. I know you can use prefix it with en_GB however doing this causes the admin to break and not show correctly.
Is there a way to change the admin so it looks in the en_GB folder or is it just a case of either:
Have you tried setup:static-content:deploy en_GB ? I'm currently developing same en_GB store and this is what I do. First deploy without en_GB and then use above command.
Yeah that's what I've been doing but seems strange deploying it twice, once for the admin and once for the frontend, I thought it would just deploy to the correct ones set in the locale really so you just have to deploy once but if doing it twice is the only way that's no problem
@jordanbrierley thank you for reporting, we have created ticket MAGETWO-52422 to investigate and fix.
@jordanbrierley After investigation, this is identified as not a bug. Here is deploy static content command options:
magento setup:static-content:deploy [lang] ... [lang] [--dry-run]
User can supply multiple languages in this command to deploy static content in multiple locales. For this case, you can do:
magento setup:static-content:deploy en_US en_GB
I will close this issue for now. Please feel free to open it if you have unanswered questions relate to this issue.
Hi Joahne,
Why is this not a bug? Is it always required to deploy static content for en_US even if that locale is not used for one of the store? I assumed that deployment of static content was only required for the actually used locales.
Maybe I'm overlooking something, but if the admin has a hard dependency on static content from the en_US locale, that seems like a bug. Could you please explain?
@kweij: every theme needs to be deployed in the locales it is using.
The backend of Magento is also built on a theme: Magento/backend, and when you install Magento, it is default configured with the locale en_US. If you don't change the locale in the configuration, you need to deploy that locale as well.
There is a pending PR which will allow you to specify a combination of themes and locales in the setup:static-content:deploy command: https://github.com/magento/magento2/pull/4294
This will allow you to do something like this:
bin/magento setup:static-content:deploy --theme Magento/backend en_US
bin/magento setup:static-content:deploy --theme My/CustomTheme de_DE fr_FR nl_NL
Which will significantly improve the performance during each deploy.
I suspect the PR to be merged in version 2.2 of Magento as Piotr mentions in that PR.
@hostep: Thanks for the explanation. So, the backend does not have a hard dependency on en_US, it's just got this locale as a default.
Looking forward to pull request being merged, that will definitely improve the speed with which we can deploy content.
Hi Joan, I need assistance on a specific implementation of the payment module for a local mobile wallet (Mpesa). Apologies for using the wrong forum for this. My email is [email protected].