2
如果我重寫了塊並且開發人員模式處於活動狀態,則不再顯示標準翻譯。我怎樣才能讓Magento迴歸到模塊的原始翻譯。在覆蓋塊時避免丟失翻譯
這與Magento: Avoid loss of translations when rewriting controllers
如果我重寫了塊並且開發人員模式處於活動狀態,則不再顯示標準翻譯。我怎樣才能讓Magento迴歸到模塊的原始翻譯。在覆蓋塊時避免丟失翻譯
這與Magento: Avoid loss of translations when rewriting controllers
這是可能的,其中用於確定應該使用哪個翻譯塊覆蓋模塊名稱:
class Acme_GreatModule_Block_Customer_Account_Navigation extends Mage_Customer_Block_Account_Navigation
{
/**
* Set the original module name to avoid breaking translations
*/
public function __construct()
{
parent::__construct();
$this->setModuleName('Mage_Customer');
}
...
請註明作爲回答你的問題,作品就像一個魅力(也有'_construct()'方法)。 – hakre