Installing a Crowdin Magento 2 language pack

Hi Craig, Hi Digitalstartup community,

Can you please give me some tips on the following;

I am trying to install a new language pack using crowding project , I have downloaded the specific language pack for magento 2.3 and uploaded the files to magento root folder… but I can’t find that language under locale

I am not about the correct commands that will enable the language pack.

Thank you.

Hello @nccdebug and welcome.

There’s a couple of methods to get translations working in Magento. But the method you’re referring to doesn’t require “installing” per se. You just upload the necessary files to the necessary location.

Grab and Upload Files
So, if I wanted to install French, then I’d download the French Pack from the Crowdin GitHub Repo and then upload those files to <magento_root>/app/i18n/language-fr_FR

Select Locale
Then select the required Locale when you go into Stores > Configuration > General > General > Locale Options

Clear Caches
Finally deploy your static content and clear your caches:

  1. Deploy Static Content for both languages: bin/magento setup:static-content:deploy en_GB en_US fr_FR -f
  2. Clean Cache: bin/magento cache:clean
  3. Flush Cache: bin/magento cache:flush
1 Like

Thank you Craig, I followed the steps above, but I am unable to select or change to the new language from “Locale Options” as this still “Disabled” under stores!

Hi,

What do you mean by dissabled?
If you have more then one store views there should be a tick box next to your not default language.

Can you please send a screen dump so we both know what we are talking about?

Pawel

You may find this post useful.

Translating Magento 2 - Installing custom language pack(s)

I straggled with installing language packadges but it was my fault.

Pawel

Hi Pawel,

Here is a screenshot

Thank you for it.

Is it your default store view?

yes, i have selected/switched to the other store views as well, but all are the same “Locale option” is disabled!

Hi,

I’ve got it.

“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.”

Please try to change to deafault or developer mode.

1st. check your mode running the following command:
bin/magento deploy:mode:show

if in production mode change it to default or developer mode running one of these 2 commands:
bin/magento deploy:mode:set default | bin/magento deploy:mode:set developer

Please let me know if this helps.

Pawel

Magento dashboard goes terribly slow in “developer mode”, i can’t reach the stores options…

I know the pain.

Try default. It is faster. Run the following command:
bin/magento deploy:mode:set default

Worth to watch
Magento 2 Modes and how to change between them

I need to shoot for 30 mins brake so I won’t be able to reply.

Please let me know wow are you doing?

PP

Hi,
Any luck with the language packs?

Hi Pawel, I just enabled the new language pack for all store views while in developer mode, but it not showing in front page… is there something missing

OK, so you’re progressing.

I don’t want to retype Craig’s message becauce I could missspell something.

Please check whether you installed your language pack in app/i18n/yourshopname/ directory.
You should have in this directory a language pack i.e. en_GB, fr_FR, de_DE
The pack should contain 4 files, registration.php, composer.json, language.xml and your csv translation file.

Remember to clear caches and deploy static content.

Ref to Craig’s notes:
Clear Caches
Finally deploy your static content and clear your caches:

  1. Deploy Static Content for both languages: bin/magento setup:static-content:deploy en_GB en_US fr_FR -f
  2. Clean Cache: bin/magento cache:clean
  3. Flush Cache: bin/magento cache:flush

I hope you changed some entries in the registration.php and language.xml files.

Hi,
There should be 3 or maybe 4 steps.

1.Installing the language pack (uploading it to app/i18n/YourVendorNane directory
2. Slightly modify your language.xml and regitration.php files - add your vendor name to the files
3. Changing locale
4. Deploying static content and cleaning cache.

Hi Pawel,

Both language.xml and registration.php already have vendor name, so I modified the directory name (app/i18n/VendorName), but still no change on frontpage.

I deployed static content, cleared cache, and switched back to default magento theme (luma), but locale is not loaded.

Hi,
I was wondering how did you do with it.

It is really difficult to say what it wrong without digging into your Magento.
It took me 3 weeks to do it because of a stupid typing error.

Can you please tell me which language pack you are trying to install?
I could try on one of my test magento installation.

A…please remove js-translation.json file from /pub/static/frontend/Magento/ (your theme, or/and Luma, or/and luma child and so on)

Before you remove anything from your server on my advise please make a back-up.

Regards,
Pawel

Hi Pawel,

I have removed js-translation.json, but nothing happened. I am trying to install Arabic
ar_SA