贴心
                全国7×24小时客服热线
            安全
                病毒杀除率高于99%
            稳定
                网站可用性高于99.9%
            实力
                服务68家上市企业及集团公司
            
  点击数:14502015-07-17 09:38:27 来源: 外贸网站建设,深圳外贸网站建设,深圳网站建设,外贸商城网站制作-亿恩科技
如何调试在 Magento 的多种翻译?
当您的存储区处理多个翻译时,有时只是想看看其中的翻译来自哪些模块列表。Magento 不能提供的方式来获取此信息,而无需编辑核心,所以我要做的事才应调试,然后删除。
第一,位于:
然后,右前行"返回 $result ;",将以下代码段:
| 
						 
								1
							 
							
								2
							 
							
								3
							 
							
								4
							 
						 | 
					
						 
								$logModule = str_pad($module, 25, "-", STR_PAD_RIGHT);
							 
							
								$logInString = str_pad($text, 150, "-", STR_PAD_RIGHT);
							 
							
								$logOutString = str_pad($result, 200, " ", STR_PAD_RIGHT);
							 
							
								Mage::log($logModule . '>' . $logInString . '>' . $logOutString, null, 'translate.log');
							 
						 | 
				
这将为每个请求,一群行向文件中写入 translate.log /var/log 下。
该文件类似于:
| 
						 
								1
							 
							
								2
							 
							
								3
							 
							
								4
							 
							
								5
							 
							
								6
							 
							
								7
							 
							
								8
							 
							
								9
							 
							
								10
							 
							
								11
							 
							
								12
							 
							
								13
							 
							
								14
							 
						 | 
					
						 
								2011-03-14T18:55:25+00:00 DEBUG (7): 
Mage_Catalog------------->Qty--------------------------------------------------------------------------------------------------------------------------------------------------->Qty
							 
							
								2011-03-14T18:55:25+00:00 DEBUG (7): 
Mage_Catalog------------->OR---------------------------------------------------------------------------------------------------------------------------------------------------->OR
							 
							
								2011-03-14T18:55:25+00:00 DEBUG (7): 
Mage_Catalog------------->Add to 
Wishlist--------------------------------------------------------------------------------------------------------------------------------------->Add
 to Wishlist
							 
							
								2011-03-14T18:55:25+00:00 DEBUG (7): 
Mage_Catalog------------->Add to 
Compare---------------------------------------------------------------------------------------------------------------------------------------->Add
 to Compare
							 
							
								2011-03-14T18:55:25+00:00 DEBUG (7): 
Mage_Catalog------------->Quick 
Overview---------------------------------------------------------------------------------------------------------------------------------------->Quick
 Overview
							 
							
								2011-03-14T18:55:25+00:00 DEBUG (7): 
Mage_Catalog------------->Details----------------------------------------------------------------------------------------------------------------------------------------------->Details
							 
							
								2011-03-14T18:55:25+00:00 DEBUG (7): 
Mage_Tag----------------->Product 
Tags------------------------------------------------------------------------------------------------------------------------------------------>Product
 Tags
							 
							
								2011-03-14T18:55:25+00:00 DEBUG (7): 
Mage_Tag----------------->Add Your 
Tags:---------------------------------------------------------------------------------------------------------------------------------------->Add
 Your Tags:
							 
							
								2011-03-14T18:55:25+00:00 DEBUG (7): 
Mage_Tag----------------->Add 
Tags---------------------------------------------------------------------------------------------------------------------------------------------->Add
 Tags
							 
							
								2011-03-14T18:55:25+00:00 DEBUG (7): 
Mage_Tag----------------->Add 
Tags---------------------------------------------------------------------------------------------------------------------------------------------->Add
 Tags
							 
							
								2011-03-14T18:55:25+00:00 DEBUG (7): 
Mage_Tag----------------->Use spaces to separate tags. Use single 
quotes (') for 
phrases.--------------------------------------------------------------------------------------->Use
 spaces to separate tags. Use single quotes (') for phrases.
							 
							
								2011-03-14T18:55:25+00:00 DEBUG (7): 
Mage_Checkout------------>My 
Cart----------------------------------------------------------------------------------------------------------------------------------------------->My
 Cart
							 
							
								2011-03-14T18:55:25+00:00 DEBUG (7): 
Mage_Checkout------------>You have no items in your shopping 
cart.-------------------------------------------------------------------------------------------------------------->You
 have no items in your shopping cart.
							 
							
								2011-03-14T18:55:25+00:00 DEBUG (7): 
Mage_Catalog------------->Compare 
Products-------------------------------------------------------------------------------------------------------------------------------------->Compare
 Products
							 
						 | 
				
你弄清楚哪些模块显示翻译后,从 Mage_Core_Model_Translate 中删除的代码行,可以快乐上路 !
亿恩科技手机站
        
关注亿恩科技微信