Installing a Crowdin Magento 2 language pack

I just added ar_SA to my Sample i18n Repo. I haven’t tested it, but perhaps @PawelP wouldn’t mind giving it a whirl as he’s used this repo before?

@PawelP would appreciate your support

Hi,
OK. Give me some time. I’m just installing a new magento to play with it.

Please note:

Magento enables you to create the following types of language packages:
1. A set of .csv files for modules and themes. These packages files are intended to be deployed in modules.
2. Language packages that contain an entire dictionary in one directory. (I’m using this method)
You can distribute this language package as a standalone component (similar to modules and themes). Interestingly, it violates Magento’s modularity principles on purpose; that is, so that a system integrator can translate variations provided by extensions. - source

The Arabic language pack you installed from crowding projec is the 1st type. I’ve never done it.

The pack from Craig is type 2nd.

Give me 10-15 mins.

Pawel

1 Like

Hi,

It took me a bit longer than I anticipated.

I’ve installed Craig’s package (Language packages that contain an entire dictionary in one directory). Works as it should :slight_smile:

I could try to play with the package from the crowding project type 1 ( A set of .csv files for modules and themes. These packages files are intended to be deployed in modules.) but I need to work out how to activate it.

@PawelP I’ll have you tagged as the i18n expert by the end of the year :wink:

1 Like

Hahahah :slight_smile:

I need to understand how to make let’s call it type 1 - ( A set of .csv files for modules and themes. These packages files are intended to be deployed in modules.) At a glance, I see that they don’t require language.xml and refistration.php files.

I need to play with it a bit longer.

Hi nccdebug,

Please let me know if you need a hand with this?
Craig’s language pack defenitely works. The other pack I’m guessing warks too but I need to do a reasearch how to make it working.

Pawel

Hi PawelP,
I would definitely need the modules work with type A as well. I can wait till next week :slight_smile:
Much appreciated.

Hi,

I’m going nowhere so far. I don’t know how to bite it.
Craig, maybe you could give a tip on how to install the language pack.

From what I can see each module has it own i18n and language.csv file.
I uploaded the files on to my clean Mag installation and fired 2 commands,
bin/magento setup:static-content:deploy ar_SA -f
bin/magento c:f

My Mag. admin conf. are correct.

Regards,
Pawel

I’ll try and have a look over the weekend.

Great.

I’d like to know too :slight_smile:
Please let me know if you can how do you gather all defaulted en_US phrases to transalte. I know that there is a command to do it.

If you hadn’t guessed I never got around to checking this out…

@nccdebug, did you ever try my Sample i18n Repo that contains the ar_SA language that you wanted? I know it’s not the Crowdin module but it contains the same translations and is probably easier to install.

@PawelP, just to check, are you asking how to create and implement i18n files to each module? And if so, are you asking How to create this from scratch? I just want to check before spending any time on it.

Hi Craig,
Let’s say I wanted to create a new language pack from scratch.
I’m happy to create language.xml, registration.php and composter.json but how to gather all original en_US magento phases to csv. I know that there is a command for it.

Craig don’t waist more that 5 mins on it. If you know how to do it please let me know if you have to research and test it please don’t.

Pawel

Oh, that’s pretty simple. I mentioned it in one of your other posts: Translating Magento 2 - Installing custom language pack(s) - #13 by digitalstartup. You don’t actually create a module.

You simply run the below command and it checks all modules currently installed in your copy of Magento 2 for Translation Opportunities (Opportunities are identified by reading PHP files, assuming they’ve been written properly). And then compiles them into a single convenient CSV file.

bin/magento i18n:collect-phrases -o "/var/www/html/fr_FR.csv" -m

Once you’ve added/amended all of your translations in the fr_FR CSV that you just generated, simply distribute your fr_FR.csv file back into all of the modules with the below command. This splits that one large file back into a bunch of smaller files that end up in the i18n folders of the modules:

bin/magento i18n:pack /var/www/html/fr_FR.csv -d fr_FR

Note: Commands assume that you want to create French (fr_FR) translations

Thank you.

I’ll play with my test magento to polish my knowledge on language packs.

Using your post above as reference, I think the general terminology for Language implementations are:

  • Type 1: Translation Directories
  • Type 2: Language Packs

Good luck

EDIT: I’ll pencil these two implementations for future videos.

Many ecommerce stores have multiple store views because they want to reach a wider audience in languages that their audience is familiar with. When a customer gets information in a familiar language, it is easier for them to understand the product or service. This, in turn, makes it easier for them to make a purchase decision.

A store in one’s own language also makes one feel like they can trust it. They feel catered to. This increases their chance of coming back to your store, provided the overall experience is good.

In this blog, we are going to talk about enabling multiple languages in Magento 2 or creating a Magento 2 multi-language website.

How to Create Multi-Language Store in Magento 2

Hello Craig

Thank you for your excellent work - I just finished watching all your M2 videos on YouTube and I did help me so much in my understanding of changes and new features in M2 environment after many years of working with M1. Youre thoughtfully created step-by-step videos did allow me to finally step into Linux and so I did manage to follow Ubuntu tutorials from DS and finally set up my Esxi box with M2 installation for testing, and i am preparing it for production.

Can i ask you are languages from your repo fully compatible with with 2.4 (=do they include all new strings added after 2.3 ) ? If not, where would you go for language that is not already in M2 ?
Thanks in advance for answer.

Hi Guys)
I need some help to setup chinese language on my magento 2.4 (VPS hosting)
I want to use composer method like mentionned here: https://github.com/mageplaza/magento-2-chinese-language-pack
But i dont know in which folder of my server i should install the language pack and execute first step : ```
composer require mageplaza/magento-2-chinese-language-pack:dev-master mageplaza/module-smtp

Is it to  /var/www/html/magento/app ( i dont have i18n file under app)
Please check the screen shot of my server ( file directory) and screen shot when i connect to server using SSH (putty)
![0|642x376](upload://1cZp4a7YuARM7JCXqi0b7WKAFLZ.jpeg)
![1|682x497](upload://2EyqLta6CPdP8LIDkR5nfpFFHkC.jpeg)
![2|685x498](upload://9UwcveZbMDQklXM9wBLZC3LNBQv.jpeg)
![3|669x251](upload://lphUikHwzCTP9XBnfPMYOvXwT7u.jpeg)
![4|686x493](upload://1HSdPRCur7RIZAVRMj5NbV4TWRO.jpeg)
![5|666x500](upload://qDZYHRdwrqu7LOTpEMXl1ZAP4zf.jpeg)
![6|683x499](upload://gkVRcLzXwPD2FrZb0cL8G4w4sqI.jpeg)
![7|658x500](upload://7yWMjRYhpOSWn65mcB9CPYci3PC.jpeg)
![8|653x500](upload://dHsWggO52cNm8VFnZDUAaMkSgJ9.jpeg)
![9|631x500](upload://6pYFWrsHzSaB9vl66QVQDGbJwun.jpeg)
![10|657x500](upload://6qsclmERdZGo5hUU1LYG0vGPGZg.jpeg)
Thanks