wierdthing Posted May 16, 2017 Share Posted May 16, 2017 Greek text when added in translations from back office has an encoding problem. Every other place you put Greek letters works fine, cms pages and the lot. The problem manifests when you try to translate, Greek letters get saved in wrong format in the database and also show in wrong format in the front-end, in the back office translations page they show correctly thought Images: Front-end: http://prntscr.com/f8fbqj Back-end: http://prntscr.com/f8fbvl Database: http://prntscr.com/f8fc18 Any help will be much appreciated. Thanks in advance. 1 Link to comment Share on other sites More sharing options...
BalzoT Posted May 16, 2017 Share Posted May 16, 2017 Is the collation of the database utf8_general_ci ? also check the tables that the info is stored for that also! Link to comment Share on other sites More sharing options...
wierdthing Posted May 16, 2017 Author Share Posted May 16, 2017 Database collation is utf8_general_ci, translation field in db is unicode_ci, have changed it to general_ci before but nothing changed. Link to comment Share on other sites More sharing options...
wierdthing Posted May 18, 2017 Author Share Posted May 18, 2017 bump Link to comment Share on other sites More sharing options...
wierdthing Posted May 22, 2017 Author Share Posted May 22, 2017 bump? Link to comment Share on other sites More sharing options...
Serge Goujon Posted May 22, 2017 Share Posted May 22, 2017 (edited) I will bump this topic since the same problem exist for Russian language as well.In back-end everything's fine - stored translations shown correctly, but in front-end it is not. But for me personally I can't find where translations are stored, so I can only tell that my tables are in utf8_general_ci encoding. To put it shortly, everything (e.g. categories, products, pages) displayed normally except altered translations after edit/store. I can provide my screenshots too. If nobody reply I will start my own bug topic. Edited May 22, 2017 by Serge Goujon (see edit history) 1 Link to comment Share on other sites More sharing options...
wierdthing Posted May 22, 2017 Author Share Posted May 22, 2017 Found the file that stores the translations finally, atleast its a decent workaround until they fix the bug.File is in app/cache/prod/translations, its a .php file. Just find it and change whatever translations you want from there and it will work 1 Link to comment Share on other sites More sharing options...
wierdthing Posted May 22, 2017 Author Share Posted May 22, 2017 (edited) Welp, as it turns out file and folder got deleted,probably because it was cache, so every change i made to it is reverted nowEdit: try app/Resources/translations/ Edit 2: Change what ever translations you want from there and then clear the cache, this seems to be working for me for now. Edited May 22, 2017 by wierdthing (see edit history) 1 Link to comment Share on other sites More sharing options...
Serge Goujon Posted May 22, 2017 Share Posted May 22, 2017 (edited) Thanks a lot, weirdthing! That's great, it's working. At least for quick & dirty fix. Anyway I hope that devs will fix that officially. P.S. I will post the issue later on GitHub. It's not the fastest way to let devs know things, but definitely the most efficient one! Update: Going to start the ticket on Forge. Edited May 23, 2017 by Serge Goujon (see edit history) 1 Link to comment Share on other sites More sharing options...
Serge Goujon Posted May 23, 2017 Share Posted May 23, 2017 (edited) Well, it appears that problem is bigger than I suppose. After I tried it with non cached files - it doesn't work for me. I found the file I need to edit in app/Resources/translations/ru-RU but editing it done nothing. Encoding is still wrong. BTW there are two files wit the same content: 1.7ShopThemeCheckout.ru-RU.xlf and ShopThemeCheckout.ru-RU.xlf. Of course I edited both, cleared cache but nothing changed. Funny thing is that in *.xlf files all the text is in CORRECT encoding. Any ideas what am I missing?.. P.S. My guess is that the problem occurs somewhere on the way of XLF->PHP cache file conversion. But I have no idea where to look. Edited May 23, 2017 by Serge Goujon (see edit history) Link to comment Share on other sites More sharing options...
Serge Goujon Posted May 23, 2017 Share Posted May 23, 2017 Started the ticket on Forge: http://forge.prestashop.com/browse/BOOM-3106 Please Add Vote there to support this issue solving! 1 Link to comment Share on other sites More sharing options...
Serios Posted June 29, 2018 Share Posted June 29, 2018 (edited) I can't believe that a year later no one from the dev's actually solved this !!!! Someone forgot to add SET NAMES routine to DB driver So the resolution is very simple: in classes/db/DbPDO.php after line 121 add: // UTF-8 support if ($this->link->exec('SET NAMES \'utf8\'') === false) { throw new PrestaShopException('PrestaShop Fatal error: no utf-8 support. Please check your server configuration.'.$e->getMessage()); } ATENTION!!! ATENTION!!! ATENTION!!! If you have working site and the data stored in your db tables looks like: Минимальная сумма заказа This fix will break your site resulting the same characters to be displayed site wide and all texts coming from the database to look like this! To solve this, is simple but time consuming. The simplest solution is to export your database and table by table to decode it. This online tool is quite useful for this 2cyr.com. If you have new installation edit the above file adding the mentioned code before adding anything to the database! Edited June 29, 2018 by Serios (see edit history) Link to comment Share on other sites More sharing options...
Serge Goujon Posted July 3, 2018 Share Posted July 3, 2018 Hey, Serios. You can't imagine how surprised I am! )) Thanks for your time and efforts and a way to solve the issue. Since nobody have answered to me (yeah, for almost 1 year) and ticket is still active yet with no changes from devs, I switched to another framework. Where people do care about their users. But I'm longtime prestashop developer, so I will give it a shot for once more, on a fresh install. In case it works I will consider the future of prestashop in my projects. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now