这是一个非常简单的问题:为了翻译这个,我需要改变什么?它在某处是硬编码的吗?内部数据库?
以下代码创建此标签,可在此文件app\design\frontend\rwd\default\template\catalog\product\view.phtml@175
找到:
<div class="product-collateral toggle-content tabs">
<?php if ($detailedInfoGroup = $this->getChildGroup('detailed_info', 'getChildHtml')):?>
<dl id="collateral-tabs" class="collateral-tabs">
<?php foreach ($detailedInfoGroup as $alias => $html):?>
<dt class="tab"><span><?php echo $this->escapeHtml($this->getChildData($alias, 'title')) ?></span></dt>
<dd class="tab-container">
<div class="tab-content"><?php echo $html ?></div>
</dd>
<?php endforeach;?>
</dl>
<?php endif; ?>
</div>
它不遵循$this->__('Recurring Profile')
模式。我的app/locale/pt_BR/Mage_Sales.csv
已经拥有键/值"Recurring Profiles","Perfis Recorrentes"
。
这是在Magento 1.9实例中运行的定期配置文件产品的页面。
答案 0 :(得分:0)
仰视 应用程序/区域/ pt_BR表示/ Mage_Sales.csv 会有类似的东西 &#34;重复的个人资料&#34;,&#34; Perfiles Repetitivos&#34;
如果文件不存在,请从app / locale / en_US / Mage_Sales.csv复制该文件,并替换为您想要的翻译。
答案 1 :(得分:0)
谢谢@scrowler。 Magento缺少正确的本地化方法调用。 app\design\frontend\rwd\default\template\catalog\product\view.phtml@175
处的代码应更改为:
<div class="product-collateral toggle-content tabs">
<?php if ($detailedInfoGroup = $this->getChildGroup('detailed_info', 'getChildHtml')):?>
<dl id="collateral-tabs" class="collateral-tabs">
<?php foreach ($detailedInfoGroup as $alias => $html):?>
<dt class="tab"><span><?php echo $this->escapeHtml($this->__( $this->getChildData($alias, 'title'))) ?></span></dt>
<dd class="tab-container">
<div class="tab-content"><?php echo $html ?></div>
</dd>
<?php endforeach;?>
</dl>
<?php endif; ?>
</div>
刚刚添加$this->__(...)
并检查.csv文件中的正确本地化。