myzuhari Posted July 5, 2013 Share Posted July 5, 2013 I tried to import my mother language but did not manage to complete it because I got an error "Validation failed for: mails/ms/lang.php". Anybody can solve my problem? Thanks in advance! Link to comment Share on other sites More sharing options...
NemoPS Posted July 5, 2013 Share Posted July 5, 2013 Arre you using the default importer which also imports units, or uploading a language pack manually? Link to comment Share on other sites More sharing options...
fuskoz Posted September 10, 2013 Share Posted September 10, 2013 Hello friends,I have the same problem. I upgraded to PS 1.5.5.0 and I'm trying to import my translation. I also get Validation failed for: mails/sq/lang.php I'm uploading a language pack manually Any idea??? Link to comment Share on other sites More sharing options...
MacRoy Posted September 10, 2013 Share Posted September 10, 2013 They've changed the paths of email templates in version 1.5.5.0 I had the same problem so I had to do everything manually. It may also be that you do not have a complete translation, some row is missing. Link to comment Share on other sites More sharing options...
fuskoz Posted September 11, 2013 Share Posted September 11, 2013 Thank you MacRoy for your reply. I need my front and back office translated and you suggest to do everything manually. You are right, I have not a complete translation but I've tried before and the missing rows were not a problem in PS 1.5.3.1 Please, anyone, any other option available? Link to comment Share on other sites More sharing options...
MacRoy Posted September 12, 2013 Share Posted September 12, 2013 Hello fuskoz! What language should you translate to? Link to comment Share on other sites More sharing options...
fuskoz Posted September 13, 2013 Share Posted September 13, 2013 My friend, I'm using ps 1.5.5.0 and I have a sq.gzip file, meaning I'm using Albanian language. I guess you have never heard of Albania )) Thank you for you feedback Link to comment Share on other sites More sharing options...
MacRoy Posted September 15, 2013 Share Posted September 15, 2013 You can add or update a language directly from PrestaShop. Have you tried it? You do it inside BackOffice / Translations Link to comment Share on other sites More sharing options...
Slumdog Posted December 16, 2013 Share Posted December 16, 2013 Having the same problem.. Anyone with a solution????? Link to comment Share on other sites More sharing options...
El Patron Posted December 16, 2013 Share Posted December 16, 2013 Having the same problem.. Anyone with a solution????? there are several problems in this topic, can you be describe your exact issue? Link to comment Share on other sites More sharing options...
jesslin Posted April 13, 2014 Share Posted April 13, 2014 I have the same problem just now.... I'm keep getting below error when I click "IMPORT A LANGUAGE PACK MANUALLY" to default-bootstrap Validation failed for: mails/tw/lang.phpplease help !! Link to comment Share on other sites More sharing options...
OzMerchant Posted August 9, 2014 Share Posted August 9, 2014 (edited) I found the source of the problem. (My PrestaShop version is 1.5.6.2.) Validation of translation fails during manual import if there are empty translation entries in the reported file. It may look like this: In the file: ...\mails\tw\lang.php $_LANGMAIL['Email verification'] = ''; In order to fix it for language xx: 1. Open translation pack (xx.gzip) 2. Within the file there is another file xx without extension. It's a TAR archive. 3. Find the problematic file In the xx TAR archive and fill missing translations (you may copy-paste English text, if you don't care about the actual translation). 4. Save the fixed file and put it back to the xx TAR archive. 5. Put xx TAR archive back to xx.gzip file. Now you can import the language pack successfully. P.S. Depends on your software you may be able to edit files directly in the .gzip->TAR archive saving yourself unzipping/untaring and putting everything back. YMMV. Edited August 9, 2014 by OzMerchant (see edit history) Link to comment Share on other sites More sharing options...
Antakarana Posted August 15, 2014 Share Posted August 15, 2014 (edited) I found the source of the problem. (My PrestaShop version is 1.5.6.2.) Validation of translation fails during manual import if there are empty translation entries in the reported file. It may look like this: In the file: ...\mails\tw\lang.php $_LANGMAIL['Email verification'] = ''; In order to fix it for language xx: 1. Open translation pack (xx.gzip) 2. Within the file there is another file xx without extension. It's a TAR archive. 3. Find the problematic file In the xx TAR archive and fill missing translations (you may copy-paste English text, if you don't care about the actual translation). 4. Save the fixed file and put it back to the xx TAR archive. 5. Put xx TAR archive back to xx.gzip file. Now you can import the language pack successfully. P.S. Depends on your software you may be able to edit files directly in the .gzip->TAR archive saving yourself unzipping/untaring and putting everything back. YMMV. Hi, I have the same problem... in my case I translated the whole shop in spanish at my local server and when I tried to import the translation at my hosting server then I get this anoying error. I realized I had emtpy translation fields and I spent several hours translating them. But nos the error still persist... So I tried to follow your solution but I'm a bit confused... I export the es.gzip file and when I open it with winrar I only see a file inside withou any extension. Anyway I can open the file and edit it with notepad.. but then what should I edit? When I go to backoffice I see that at email translations there are 11 missing translations but I can't find them. I've opened all the emails templates one by one and I only have saw some empty subjects which I had already filled so now the lang.php from /mails and from theme/mails are filled. However the error still persist... So where is the problem?? Thanks Edited August 15, 2014 by Antakarana (see edit history) Link to comment Share on other sites More sharing options...
OzMerchant Posted August 16, 2014 Share Posted August 16, 2014 (edited) I realized I had emtpy translation fields and I spent several hours translating them. But nos the error still persist... Empty translation fields in the BackOffice are OK. I think it's a bug in PrestaShop or some other malfunction that untranslated fields are copied into the language files. The problem is when there are empty values for translation entries in the files. So I tried to follow your solution but I'm a bit confused... I export the es.gzip file and when I open it with winrar I only see a file inside withou any extension. Anyway I can open the file and edit it with notepad.. but then what should I edit? This file without extension is a TAR archive, which contains the whole directory with other files. Unzip this file on the disk and then open it with WinRAR again. (If I remember correctly, WinRAR can open TAR) files. If WinRAR is confused, then just add ".tar" extension to the file. Now you should be able to open the TAR archive and see all the directories and files. Once you see the files, just navigate to the file that fails validation, then open it for edit (directly from WinRAR, if it supports this feature). If WinRAR cannot edit the file directly in the archive, then you have to untar everything on the disk first. In the problematic file find all empty entries and add some text there, for example, copy English text. Then you need to go all the way back: put the fixed file back to TAR archive; (don't forget to remove the extension, if you added it); put the TAR archive to ".gzip" file. When I go to backoffice I see that at email translations there are 11 missing translations but I can't find them. I've opened all the emails templates one by one and I only have saw some empty subjects which I had already filled so now the lang.php from /mails and from theme/mails are filled. However the error still persist... So where is the problem?? I think the problem is in the file, which fails validation. The entry may be there, but the value is empty. In my case empty entries look like this: $_LANGMAIL['Email verification'] = '';Once I fixed all of them I could import the translation. Edited August 16, 2014 by OzMerchant (see edit history) Link to comment Share on other sites More sharing options...
Antakarana Posted August 16, 2014 Share Posted August 16, 2014 Empty translation fields in the BackOffice are OK. I think it's a bug in PrestaShop or some other malfunction that untranslated fields are copied into the language files. The problem is when there are empty values for translation entries in the files. This file without extension is a TAR archive, which contains the whole directory with other files. Unzip this file on the disk and then open it with WinRAR again. (If I remember correctly, WinRAR can open TAR) files. If WinRAR is confused, then just add ".tar" extension to the file. Now you should be able to open the TAR archive and see all the directories and files. Once you see the files, just navigate to the file that fails validation, then open it for edit (directly from WinRAR, if it supports this feature). If WinRAR cannot edit the file directly in the archive, then you have to untar everything on the disk first. In the problematic file find all empty entries and add some text there, for example, copy English text. Then you need to go all the way back: put the fixed file back to TAR archive; (don't forget to remove the extension, if you added it); put the TAR archive to ".gzip" file. I think the problem is in the file, which fails validation. The entry may be there, but the value is empty. In my case empty entries look like this: $_LANGMAIL['Email verification'] = '';Once I fixed all of them I could import the translation. Thank you for your detailed answer. I hope it helps me in the next time... I finally lost my patience and just translated everything again... Link to comment Share on other sites More sharing options...
webgo Posted July 14, 2015 Share Posted July 14, 2015 I have the same problem Validation failed for: translations/es/tabs.php Link to comment Share on other sites More sharing options...
Recommended Posts