创建语言文件 joomla 3.8.3(php 相关)

Creating language file joomla 3.8.3 (php related)

我在 virtuemart 插件的快速视图中有这段代码,它是关于 "QUICK VIEW" 按钮的,并且连接到后端,在那里我可以更改它的标签名称。我宁愿把它连接到 .ini 文件,这样我就可以让它准备好多语言。非常感谢任何帮助。

        jQuery(document).ready(function ($) {
            function _SJQuickView(){
                var $item_class = $('<?php echo $cls_str; ?>');
                if ($item_class.length > 0) {
                    for (var i = 0; i < $item_class.length; i++) {
                        if($($item_class[i]).find('.sj_quickview_handler').length <= 0){
                            var producturlpath = $($item_class[i]).find('a', $(this)).attr('href');
                            if(typeof producturlpath !== 'undefined' && producturlpath.length > 0 ){
                                producturlpath = ( producturlpath.indexOf('?')  >= 0 ) ? producturlpath + '&tmpl=component' : producturlpath + '?tmpl=component' ;
                                var _quickviewbutton = "<a  class='sj_quickview_handler' href='" + producturlpath + "'><?php echo $this->_params->get('label_button','quick view');?></a>";
                                $($item_class[i]).append(_quickviewbutton);
                            }
                        }
                    }
                }
            }

这篇我认为是关键:

var _quickviewbutton = "<a  class='sj_quickview_handler' href='" + producturlpath + "'><?php echo $this->_params->get('label_button','quick view');?></a>";

很简单。 只需将代码替换为

var _quickviewbutton = "";

然后用 QUICK_VIEW

添加翻译