kenkokafe Posted June 3, 2013 Share Posted June 3, 2013 I have attached a picture that is selfexplanatory. I have the shop in english and latvian. but when a customer registers, wether english or latvia, the name of the selection of the country is in spanish. any help Link to comment Share on other sites More sharing options...
vekia Posted June 3, 2013 Share Posted June 3, 2013 you've got spanish translation / language installed in your store? (under the localization tab in your back office) ? Link to comment Share on other sites More sharing options...
kenkokafe Posted June 4, 2013 Author Share Posted June 4, 2013 yes I do . the back office was installed in spanish. And I have 3 languages in the pack, spanish, english and latvian. But the countries on that drop list does not appear in any other language. any idea? thanks Link to comment Share on other sites More sharing options...
vekia Posted June 4, 2013 Share Posted June 4, 2013 it is active? Link to comment Share on other sites More sharing options...
kenkokafe Posted June 4, 2013 Author Share Posted June 4, 2013 (edited) no. only active english and latvian. has a red cross the spanish one has the cross Edited June 4, 2013 by kenkokafe (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted June 4, 2013 Share Posted June 4, 2013 weirdy. Can you remove spanish? or maybe you want to use it in the future? you should give it a try Link to comment Share on other sites More sharing options...
kenkokafe Posted June 4, 2013 Author Share Posted June 4, 2013 Done it and it is still not working. No i´m on english and latvian. nothing else and no luck chuck Just thinking would it be cuz the back office was installed in spanish? but that does not make sense really Link to comment Share on other sites More sharing options...
emily_d Posted June 5, 2013 Share Posted June 5, 2013 (edited) Language packs are incomplete, they don't contain all translations. Just days before the 1.5.4 release, the multi-language installation was disabled. The unforeseen consequence was that some translations are not available via language packs. Countries' as you experienced but many more little things : date format, order state etc. See http://forge.prestas...wse/PSCFV-8720. There's a fix but it only works during a new installation. Edited June 5, 2013 by emily_d (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted June 5, 2013 Share Posted June 5, 2013 @emily_d thanks for this information! it is really helpfull in this case now everything should be clear Link to comment Share on other sites More sharing options...
kenkokafe Posted June 5, 2013 Author Share Posted June 5, 2013 well.. i have tried to do the installation from scratched. and once i copy the data base and my prestashop folders remains unchanged. i might not be finding the solution for that. I tried the install thing from the module folder and has not work it would not let me further installation. any more ideas regards Link to comment Share on other sites More sharing options...
vekia Posted June 5, 2013 Share Posted June 5, 2013 it's because you imported database (I understood you well?) Try to NOT import the ps_country ps_country_lang and ps_country_shop tables Link to comment Share on other sites More sharing options...
emily_d Posted June 5, 2013 Share Posted June 5, 2013 well.. i have tried to do the installation from scratched. and once i copy the data base and my prestashop folders remains unchanged. If you tried the fix I mentioned above, you need to understand that the missing translations are part of the database, so if you copy your database it will not work. As I said it only works for a new installation. Link to comment Share on other sites More sharing options...
kenkokafe Posted June 5, 2013 Author Share Posted June 5, 2013 Yes, thank you very much, but i will have to re-do the whole site again, will not I? If so can i just change the data base part that related to this? any other option? another thing i noticed. regards Link to comment Share on other sites More sharing options...
vekia Posted June 5, 2013 Share Posted June 5, 2013 you can change customer "titles" in the back office. just open the: Customer > Titles tab and edit values for available titles try this, maybe there you haven't got translations 1 Link to comment Share on other sites More sharing options...
kenkokafe Posted June 5, 2013 Author Share Posted June 5, 2013 (edited) OK!!! that worked now the other issues many many thanks both of you Following yout advice. I have a cheao long shot way of sorting it out. I will see the countries that are withing my shipping range and I will edit one by one and change their name from spanish to english, latvian or what ever they are. As some one said there is not urgent things just people in a hurry. if some figures out a solution that does not need this long process, and does not involve losing my database, please post it. Edited June 5, 2013 by kenkokafe (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted June 5, 2013 Share Posted June 5, 2013 Try to NOT import the ps_country ps_country_lang and ps_country_shop tables Link to comment Share on other sites More sharing options...
emily_d Posted June 5, 2013 Share Posted June 5, 2013 if some figures out a solution that does not need this long process, and does not involve losing my database, please post it. It's possible but there's no easy way, cause the language ids are probably different. Also it's possible to write a script to import the xml files that are in "install\langs\en\data" in the .zip of a new Prestashop install. There you'll find all the missing translations. The format is like this : <?xml version="1.0"?> <entity_gender> <gender id="1" name="Mr."/> <gender id="2" name="Ms."/> <gender id="3" name="Miss"/> </entity_gender> So you'll need a script that will read this xml and then make a SQL update on the database with something looking (that's no working code !) : UPDATE ps_gender_lang SET name=value_from_xml WHERE id_lang= english_id; Then this needs to be done for all xml files in "install\langs\en\data". For countries : <?xml version="1.0"?> <entity_country> <country id="DE"> <name>Germany</name> </country> <country id="AT"> <name>Austria</name> </country> <country id="BE"> <name>Belgium</name> </country> <country id="CA"> <name>Canada</name> </country> <country id="CN"> <name>China</name> </country> <country id="ES"> <name>Spain</name> </country> <country id="FI"> <name>Finland</name> </country> ... and UPDATE ps_country_lang SET name=value_from_xml WHERE id_lang= english_id; but here you should get the country id before updating. 1 Link to comment Share on other sites More sharing options...
kenkokafe Posted June 5, 2013 Author Share Posted June 5, 2013 (edited) merci vu cu i will try to do so and see what happens. thanks i ´d say this is solved for me many thanks Edited June 5, 2013 by kenkokafe (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted June 5, 2013 Share Posted June 5, 2013 great! thanks for information that this issue is fixed for you now! Im going to mark this thread as [solved] regards! Link to comment Share on other sites More sharing options...
antoniocici Posted June 16, 2015 Share Posted June 16, 2015 Thanks to your suggestions, I've wrote down a couple of rows to update the country names for the english language. As suggested, I've picked the file country.xml inside the folder /install/langs/en/data . I've copied it into the admin folder and I've created, in the same folder, a file named tool.php, with the following lines: <?php define('_PS_ADMIN_DIR_', getcwd()); define('PS_ADMIN_DIR', _PS_ADMIN_DIR_); // Retro-compatibility include(PS_ADMIN_DIR.'/../config/config.inc.php'); $countries= simplexml_load_file(dirname(__FILE__).'/country.xml'); foreach ($countries as $row) DB::getInstance()->execute("UPDATE "._DB_PREFIX_."country_lang SET name = '".$row->name."' WHERE id_lang = 2 AND id_country = (SELECT c.id_country FROM "._DB_PREFIX_."country c WHERE c.iso_code = '".$row['id']."')"); echo 'done'; ?> In my case, the english language id was 2 (id_lang = 2), so you should change it with your own. The same code, with the right changes, can be used for almost every language table present into the install folder. I hope this code can be helpful to someone. 1 Link to comment Share on other sites More sharing options...
walterkort Posted November 3, 2015 Share Posted November 3, 2015 (edited) He Antoniocici, your solution looks very good! Thing is...I'm getting a 404 when trying to reach the php-file. Do you know how I can fix this? Edited November 3, 2015 by walterkort (see edit history) Link to comment Share on other sites More sharing options...
larchbaikal Posted November 9, 2015 Share Posted November 9, 2015 help Link to comment Share on other sites More sharing options...
Kanjirulo Posted September 12, 2016 Share Posted September 12, 2016 This works for me, Many thanks Thanks to your suggestions, I've wrote down a couple of rows to update the country names for the english language. As suggested, I've picked the file country.xml inside the folder /install/langs/en/data . I've copied it into the admin folder and I've created, in the same folder, a file named tool.php, with the following lines: <?php define('_PS_ADMIN_DIR_', getcwd()); define('PS_ADMIN_DIR', _PS_ADMIN_DIR_); // Retro-compatibility include(PS_ADMIN_DIR.'/../config/config.inc.php'); $countries= simplexml_load_file(dirname(__FILE__).'/country.xml'); foreach ($countries as $row) DB::getInstance()->execute("UPDATE "._DB_PREFIX_."country_lang SET name = '".$row->name."' WHERE id_lang = 2 AND id_country = (SELECT c.id_country FROM "._DB_PREFIX_."country c WHERE c.iso_code = '".$row['id']."')"); echo 'done'; ?> In my case, the english language id was 2 (id_lang = 2), so you should change it with your own. The same code, with the right changes, can be used for almost every language table present into the install folder. I hope this code can be helpful to someone. Link to comment Share on other sites More sharing options...
Recommended Posts