3

If I open the translation for "Incl. 7% Tax, plus Shipping Cost" it says:

Location:  Span element 
Scope:  FireGento_GermanSetup 
Shown:  19% 
Original:  %s%% 
Translated:  %s%% 
Store View Specific:  
Custom:  %s%%

How can I change the translation text?

Found the source file price_info.phtml

<span class="tax-details"><?php echo $this->__('Incl. %s Tax, plus <a href="%s">Shipping 
   Cost</a>', $this->getFormattedTaxRate(), $shippingCostUrl) ?></span>

This is the same problem, but the solution does not work for me or I can not make it work.

1 Answer 1

4

There are situations where the inline translation does not work, because Magento can not identify the correct source string when clicking the translation icon.

You can always do a manual translation.

First you have to identify in from which module the translation comes from. By enabling template-hints you could find out that your translation is printed in app/design/frontend/base/default/template/germansetup/price_info.phtml via $this->__() and $this is of the type FireGento_GermanSetup_Block_Catalog_Product_Price the module is FireGento_GermanSetup. (there could be rare cases where this is incorrect, if the helper overwrites the module)

If you have a look at app/locale/de_DE/FireGento_GermanSetup.csv, you find the translation line:

"Incl. %s Tax, excl. <a href=""%s"">Shipping Cost</a>","Inkl. %s MwSt., zzgl. <a href=""%s"">Versandkosten</a>"

Custom translations can be added to a translate.csv in your theme (example: /app/design/frontend/foo/bar/locale/de_DE/translate.csv) or into the database table core_translate.

I suppose you translate the whole application using inline translations, so the core_translate table would be the way to go.

No in the string column, you have to prefix the string with the module name and :: resulting in the following fields to fill (locale, store_id can be copied from your existing entries):

string: FireGento_GermanSetup::Incl. %s Tax, excl. <a href=""%s"">Shipping Cost</a> translate: My own text ... Inkl. %s MwSt., zzgl. <a href=""%s"">Versandkosten</a>

A line in the translate.csv would look like this:

"FireGento_GermanSetup::Incl. %s Tax, excl. <a href=""%s"">Shipping Cost</a>";My own text ... Inkl. %s MwSt., zzgl. <a href=""%s"">Versandkosten</a>"

4
  • my own translate.csv did not work but app/locale/de_DE/FireGento_GermanSetup.csv does. Thanks a lot! Commented Feb 5, 2013 at 9:18
  • Please do not change the module translation directly. Did you try to insert the string to core_translate. The database has priority over the files.
    – Alex
    Commented Feb 5, 2013 at 9:23
  • Alright, I used core_translate. That worked without FireGento_GermanSetup:: prefix. Commented Feb 5, 2013 at 9:30
  • Did it also work with the prefix? Prefixing is more clean but basically has only an effect when in Developer Mode. If it did not work with the prefix I guess there are some module overwrites in place that change the translation module used.
    – Alex
    Commented Feb 5, 2013 at 9:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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