1

I have a problem with magento 2 forma validation translation.

Not all fields are translated. (The Geburtsdatum and E-Mail field)

Validation translation missing

In my translation file de_DE.csv

"Please enter a valid email address (Ex: johndoe@domain.com).","Bitte gib eine gültige E-Mail an."

But this doesn't work. Anybody an idea what's wrong?

EDIT:

With language pack it works, but i have trouble with date messages.

"Please enter a date.", "Gib bitte ein Datum ein."
"Please enter a valid full date.", "Gib bitte ein gültiges Datum ein."
"Please enter a valid month (1-12).","Bitte gültiges Monat eingeben (1-12)."

"please enter a valid date/year" works.. thats strange

Umfi
  • 83
  • 2
  • 8
  • 1
    For Javascript text translation in Magento2, you need to follow a different way - http://magento.stackexchange.com/questions/121251/magento2-translating-javascript-ko-template-text this should help – Atish Goswami Aug 03 '16 at 07:25
  • thanks that helped me, but i got problem with a few translations. see my edit – Umfi Aug 03 '16 at 09:49
  • 1
    You will have to run static content deploy everything you make a changes in your language pack .CSV file. Also make sure that you delete the js-translation.json file before running static content deploy using find pub/static -name js-translation.json -exec rm -rf {} \; after this run php bin/magento setup:static-content:deploy and after that check if the new translation are being transferred to the js-translation.json file. To find the translation do find pub/static -name js-translation.json – Atish Goswami Aug 03 '16 at 10:02
  • hey, i made everything, but i cant translate those values. could this be a magento bug? – Umfi Aug 04 '16 at 15:15
  • Yes, it seems to be bug. I did some digging into the codebase and found those sentences which are not getting translated are not enclose in $.mage.__(), hence not getting translated. See file vendor/magento/magento2-base/lib/web/mage/validation/validation.js – Atish Goswami Aug 05 '16 at 06:40
  • Hi Umfi. I'm having a problem like this, please help me if your problem has been answered – Brian N Jun 13 '19 at 10:11

0 Answers0