0

I am trying to Translate this phrase: Search entire store here... that appears in the default Search Form.

So far I have tried adding it here:

staging/app/design/frontend/default/mytemplate/locale/pl_PL/translate.csv

I have also added it

here:/public_html/staging/app/locale/pl_PL/Mage_CatalogSearch.csv

But still no luck. Any suggestion will be greatly appreciated.

2

I) To translate your word, it should have the method translation ! something like: $this->__('Your word here') or Mage::helper('module')->__('Your word here');. So check if you have well the translate method in your file.

II) You have 3 different methods to add or change a translations in Magento:

1) Inline Translation :

The translations will be placed in the database (core_translate table). You can enable the Inline Translation for frontend or backend separately. To do it: System -> Configuration -> Developer -> Translate Inline. Also, you can use the Inline Translation method to add a new translation to the Default Config (all stores) or to the specific store view.

2) Theme translation :

It allows you to add a translation only to a specific theme. All changes will be placed in the CSV file in this path: app/design/{area}/{package}/{theme}/locale/{language_code}{country_code}/translate.csv

3) Module translations :

This kind of translation is used for Default Config (all stores). It is stored within: app/locale/{language_code}_{country_code}/{namespace}_{module}.csv

For more information

EDIT:

For the search module Go to app/design/frontend/{package}/{theme}/template/catalogsearch/form.mini.phtml for exemple and check if you have the translation method then translate it according my answer.

the form.mini should looks like this:

<form id="search_mini_form" action="<?php echo $catalogSearchHelper->getResultUrl() ?>" method="get">
<div class="form-search">
    <label for="search"><?php echo $this->__('Search:') ?></label>
    <input id="search" type="text" name="<?php echo $catalogSearchHelper->getQueryParamName() ?>" value="<?php echo $catalogSearchHelper->getEscapedQueryText() ?>" class="input-text" maxlength="<?php echo $catalogSearchHelper->getMaxQueryLength();?>" />
    <button type="submit" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Search')) ?>" class="button"><span><span><?php echo $this->__('Search') ?></span></span></button>
    <div id="search_autocomplete" class="search-autocomplete"></div>
    <script type="text/javascript">
    //<![CDATA[
        var searchForm = new Varien.searchForm('search_mini_form', 'search', '<?php echo Mage::helper('core')->jsQuoteEscape($this->__('Search entire store here...')) ?>');
        searchForm.initAutocomplete('<?php echo $catalogSearchHelper->getSuggestUrl() ?>', 'search_autocomplete');
    //]]>
    </script>
</div>

  • Thanks, Prince, so how do I translate the default Magento Search entire store here... the phrase that appears in the Search Box..... – user2531490 Aug 1 '17 at 13:13
  • Look my update please – PЯINCƏ Aug 1 '17 at 13:22
  • So it has $this->__('Search entire store here...'), which was the main reason why i went for this option: staging/app/design/frontend/default/mytemplate/locale/pl_PL/translate.csv. So what am i doing wrong? – user2531490 Aug 1 '17 at 13:34
  • The path is correct then inside you put this : "Search entire store here...","The translate here..." then flush the cache – PЯINCƏ Aug 1 '17 at 13:56
  • I have done that. Still no luck :( – user2531490 Aug 1 '17 at 14:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.