Showing posts with label translation. Show all posts
Showing posts with label translation. Show all posts

Monday, December 3, 2012

PS 1.5 - warning, please wait for mature version!

Long time no blogging, I'll see if I can rectify that...

I've been playing around with PS 1.5.2 for a bit and I must say that 1.5 is not yet mature.
Some bugs I've found:
  • Installing 1.5.2 breaks other installations if same database is used! - I installed 1.5.2 and supplied db-prefix hk_, after install, all references to Swedish was wiped out from my old installation that has ps_ as db-prefix.
  • With a Swedish browser (tested with FF 16 and IE 9) and registring a new address as customer, El Salvador is proposed as country (see old blog post for plausible reason).
  • For apparently no reason, sometimes all products show up twise; if this happens, don't delete the duplicates since that removes the originals too.
  • When searching for products, either via the search box or by clicking a tag, some products are listed with a price of 0; in other views (featured, category etc) the price is shown OK). In the cart, prices are OK so no monetary risk but not very pretty.
  • The Suppliers Block is broken: The title bar is not a link, if code is changed to make it work clicking it shows "There are no suppliers." ($nbSuppliers that is supposed to hold the number of suppliers is 0 and no variables holds any supplier-info.)
  • The MoneyBookers Module has a small issue that the image that is supposed to show up has the wrong name in the code (or the image is not included/has the wrong name).
Annoyances:
  • It is getting increasingly difficult to get help via the forum.
  • I'm not sure if reporting bugs does any good since there is absolutely zero feedback.
  • Not that many Modules/Themes are ported/developed for 1.5 because, I would think, of the issues with that version.
I'll try to get back soon with some information on a couple of tweaks I've done.

Monday, February 15, 2010

Translations

If you want to translate something in PrestaShop, don't edit any files!

This is the way to do it

  • In the Back Office, go to Tools and Translations
  • Select where the translation is to be made, usually in a Module or the Front Office, and click the flag of the country whose language you want to translate to
  • Click Expand all fieldsets and search for the phrase you want to translate
  • Enter the translation and click Update Translations
Simple as that
What this does is add the translated phrase(s) to a file called xx.php where xx is the ISO-Code of the country (where it is located depends on what you have translated).
It is also (I guess) possible to edit that file directly but I wouldn't recommend it.

OK, that's not too hard, but what if I want to add some text and translate that?

Lets say we want to add the text "This is a test shop, please do not order anything" to all product pages.

  • Go to the themes directory (themes/prestashop by default) and edit the file product.tpl
  • Enter this where you want the text to appear {l s='This is a test shop, please do not order anything'}
  • Then follow the steps above and you will see that the phrase has popped up to be translated in the Back Office
Note that if the phrase is located in a module the xxx.tpl file is located in modules/xxx where xxx is the name of the module, and that you need to add the module name in the code, ie
{l s='This is a text to be shown in a module' mod='xxx'}
If you forget about the mod='xxx', the phrase will show up to be translated in the Back Office, but the translated phrase will never show up in the shop.

If you want to change a text, I'd advise you not to change it in the code but instead use the translation tool and translate from English to English.