You are here:  » New customer questions


New customer questions

Submitted by iotivedo on Tue, 2014-07-01 07:39 in

First of all congratulation for your script and for your support. I browse the forum and I really appreciate
your answers, fast and accurate.

Well these are my first questions :D

1. Best way to translate the Admin area
2. Best way to translate filter search terms (ex: category:mycategory)
3. Best way to translate FURL (Product/category/merchant links)

Thx

Submitted by support on Tue, 2014-07-01 09:34

Hello iotivedo,

Thank you for your comments and welcome to the forum!

> 1. Best way to translate the Admin area

For the release of 14/06A I will add translation hooks for all text that appears in /admin/ - that will be much better than simply translating the text within the actual scripts as this would be overwritten of course when upgrading. I'll let you know as soon as I've incorporated that into the beta build.

> 2. Best way to translate filter search terms (ex: category:mycategory)

Let's assume you would like to translate merchant => merchand, category => categorie and brand => marque. First edit .htaccess and using the Search and Replace function of your text editor, make the replacements of each instance of merchant / category / brand with your required translations (there are 5 instances of each word).

Next, edit search.php and look for the following code at line 98:

  case "brand":

...and REPLACE with:

  case "brand":
  case "merchand":
  case "categorie":
  case "marque":
    $search = array("merchand","categorie","marque");
    $replace = array("merchant","category","brand");
    $parts[0] = str_replace($search,$replace,$parts[0]);

Finally, you just need to modify the top level links that are generated to the A-Z pages for each index. To do this, edit html/searchform.php and as with .htaccess, search and replace each instance of merchant, category and brand with your required translation.

This mod will cover both the URL for merchant/category/brand links and wherever you see it displayed throughout the site e.g. category:Accessories.

> 3. Best way to translate FURL (Product/... links)

As with the above, first edit .htaccess and replace "product" at line 6 with your required translation. Then in includes/tapestry.php look for the following code at line 69:

return $config_baseHREF."product/".urlencode(tapestry_hyphenate($product["normalised_name"])).".html";

...and replace "product" with your required translation to complete the mod - and that's it!

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by iotivedo on Tue, 2014-07-08 10:53

Thank you for reply to my questions.
Have you an ETA for the admin panel with translate feature?

Submitted by support on Tue, 2014-07-08 11:33

Hi iotivedo,

No problem - I'm about to post an update to the beta and I'll expedite to include /admin/ translation; I'll update the beta thread as soon as this is online.

Cheers,
David.
--
PriceTapestry.com