0

I am new to magento,

I want to add language options(Burmese) for magento website, my current magento version is 2.2.8.

At first I run this command to get burmese language pack and I think that language pach file is successfully installed.

composer require mageplaza/magento-2-burmese-language-pack:dev-master

Package "mageplaza/magento-2-burmese-language-pack:dev-master" listed for update is not installed. Ignoring.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing mageplaza/magento-2-burmese-language-pack (dev-master 1f9bd6a): Cloning 1f9bd6acb0 from cache
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files

But problem is when I try to run the following command.

 php bin/magento setup:static-content:deploy my_MM

and I got these error,

 [Magento\Framework\Exception\LocalizedException]
 NOTE: Manual static content deployment is not required in "default" and "developer" modes.
  In "default" and "developer" modes static contents are being deployed automatically on demand.
 If you still want to deploy in these modes, use -f option: 'bin/magento setup:static-content:deploy -f'

I think this error is over Burmese Language will be shown in locale, any suggest is greatly appreciated.

Thanks!!

0

Just Simply you need to use Forcefully Command. Try to use this command that will fix your issue.

php bin/magento s:s:d my_MM -f 

Hope this will help you!!

0

The problem is not with your Burmese locale pack, its just after installing any locale pack you need to regenerate the static content for that locale pack, so to achieve the same, kindly follow the below steps:

1. Delete all folders under pub/static
2. Delete var/cache
3. Delete var/generation
4. Delete var/view_preprocessed

After running the commands for above tasks mentioned, you need to regenerate the static file for your new locale, so run

php bin/magento setup:static-content:deploy -f my_MM

@SAWAUNG Your command was just missing -f which means we are forcing static content to be deployed, and the error you got because you must be doing development in Developer or Default mode, and in these two modes the static contents are being deployed automatically.

Your above command i.e. php bin/magento setup:static-content:deploy my_MM will work as expected only in Production mode.

So keypoint is whenever you are doing any development of magento website always remember to switch to Developer mode and use -f to deploy static content.

Hope this provide an insight that why that error came on running the deploy command without -f. If yes, then kindly mark it as an accepted answer.

Thanks.

  • I run 4 commands as you said, and do deploy but got this error. [InvalidArgumentException] my_MM argument has invalid value, please run info:language:list for list of available locales, why does this error happen again? – SAWAUNG Nov 3 '19 at 6:46
  • @SAWAUNG You got this error because of wrong language code, Run php bin/magento info:language:list command to check whether your my_MM language code exists in that list or not. Only the language mentioned in that list will work with the deploy command. For example if you run sudo php bin/magento setup:static-content:deploy -f en_US it work like a charm because en_US is present in language list. – Chandan Rai Nov 3 '19 at 7:26
  • @SAWAUNG If you want me to explain in detail that how you can create and use language-pack component in Magento 2, then let me know. Will create a detailed post for that. – Chandan Rai Nov 3 '19 at 7:30

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.