如果我打开“含7%税,再加运费成本”的翻译,则说:

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

如何更改翻译文本?

找到了源文件 price_info.phtml

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

这是 同样的问题, ,但是该解决方案对我不起作用,或者我无法使其起作用。

有帮助吗?

解决方案

在某些情况下,内联翻译不起作用,因为在单击翻译图标时,Magento无法识别正确的源字符串。

您可以随时进行手动翻译。

首先,您必须确定翻译来自哪个模块。通过启用模板暗示,您可以发现您的翻译已打印在 app/design/frontend/base/default/template/germansetup/price_info.phtml 通过 $this->__()$this 是类型 FireGento_GermanSetup_Block_Catalog_Product_Price 模块是 FireGento_GermanSetup. 。 (如果助手覆盖模块,可能很少有不正确的情况)

如果你看着 app/locale/de_DE/FireGento_GermanSetup.csv, ,您发现翻译行:

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

自定义翻译可以添加到 translate.csv 在您的主题中(例如: /app/design/frontend/foo/bar/locale/de_DE/translate.csv)或数据库表中 core_translate.

我想您使用内联翻译翻译整个应用程序,所以 core_translate 桌子将是必经之路。

没有 string 列,您必须将字符串前缀带有模块名称和 :: 导致以下字段填充(locale, store_id 可以从您的现有条目中复制):

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

一条线 translate.csv 看起来像这样:

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

许可以下: CC-BY-SA归因
scroll top