0

I'm having some issues with translating the validation csv file. I did go to public_html/lib/web/i18n - downloaded the existing en_US.csv file and translated it. I cleared all the empty lines, as it is said in the Magento 2 documentation and uploaded it to the same folder with name bg_BG.csv for my native language.

Then I did - php bin/magento i18n:pack lib/web/i18n/bg_BG.csv -d bg_BG as shown in here Magento 2 Translations not working I also did navigate to public_html folder first with cd command so I can run the command.(otherwise it gives me - "magento no such a command or directory"

The result is this -

> ` In AbstractFile.php line 112:
> 
>   Missed context in row #1.   Each row has to consist of 4 columns
> original phrase, translation, context type, context value `

and nothing yet in the frontend enter image description here

1
0

You can install https://github.com/mageplaza/magento-2-bulgarian-language-pack If you have install using composer, location of csv will be here magento_root/vendor/mageplaza/magento-2-bulgarian-language-pack/bg_BG.csv

Edit bg_BG.csv add new row

"English Text" "Translated text" "module" "Magento_Customer"

"This is a required field" "Translated text" "lib" "web"

Deploy static file using this command

php bin/magento setup:static-content:deploy bg_BG -f
6
  • Dude, your method translated 95% of the website, anyway it does not apply to the "This field is required." and another popup messages for the registration form. It is not subzero wins-fatality for the case. According to another post I found in here I have to edit the validation.js file, which is not reccomendet at all, so I will try it on a local host. Thanks a lot for your answer. You are awsm. HUG Jul 1 '20 at 12:36
  • You can search text using this command grep -Rw 'app' -e 'This is a required field.' Jul 1 '20 at 16:35
  • As text from js file magento2 lib $.mage.__('This is a required field.'). Instead of module, here we can use "lib" "web" Jul 1 '20 at 16:55
  • As long as I remember, the bg_BG.csv file, which I downloaded with the bulgarian language pack from the github link was - "English text" "Translated text", "lib, "web", but it didn't do the trick :( . Anyway, now i located all the strings in public_html/lmageib/web/ validation.js file. I had an idea creating an i18n folder with a .csv file in this location with "lib" "web". Do you think it will do the trick ? Jul 2 '20 at 7:13
  • I've checked bg_BG file. Here dot is missing in csv. In your snapshot, there is dot after sentence. You can create new row and use "This is a required field." "Translated text." "lib" "web" . We need to exactly copy all text under comma $.mage.__('This is a required field.') Jul 3 '20 at 5:04

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.