简体   繁体   English

Magento前端亮点翻译

[英]Magento frontend hightlight translations

I am trying to make Magento highlight translations on the front end of the website and show what file the translation is in. 我正在尝试使Magento在网站的前端突出显示翻译,并显示翻译在哪个文件中。

I'm not really sure where best to start with this and cant find anything similar. 我不太确定最好从哪里开始,也找不到类似的东西。

Edit: I managed to do this by extending the Translate model, was actually very simple. 编辑:我设法通过扩展翻译模型来做到这一点,实际上非常简单。

You're in luck! 你真幸运! Magento has this built in. Go to admin, and go to; Magento具有内置功能。转到管理员,然后转到;

System > Configuration

From the top menu, then; 然后从顶部菜单;

Developer

From the left menu (its at the bottom). 从左侧菜单(位于底部)。

Open the 'translate inline' tab, and enable for front end. 打开“内联翻译”标签,然后启用前端。 Flush your cache and go back to the frontend. 刷新缓存并返回到前端。 It will now show you the paths for labels which live in the /app/locale/[COUNTRY CODE] folders. 现在,它将为您显示/ app / locale / [COUNTRY CODE]文件夹中的标签路径。

NOTE: Don't do this on a production site, as others will see the labels too. 注意:请勿在生产现场执行此操作,因为其他人也会看到标签。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM