在 php 和 table 中使用 jtext
using jtext in php with table
我的 joomla 站点中有一个模块显示了一个 table 其中包含一些元素,我想使用 joomla jtext 帮助程序将该模块本地化为英语;
默认代码是:
<table dir="rtl" id="gold-table" class="table table-hover table-responsive" style="margin-bottom: 0"><thead><tr><?php
if($title == 'true' ){echo '<th data-field="forks_count" data-sortable="true">'. 'عنوان محصول'.'</th>' ;}
if($code == 'true') {echo '<th>'. 'کد محصول'.'</th>' ;}
if($cat == 'true') {echo '<th>'. 'مجموعه محصول'.'</th>' ;}
if($grade == 'true') {echo '<th>'. 'گرید محصول'.'</th>' ;}
if($unit == 'true') {echo '<th>'. 'واحد قیمت گذاری'.'</th>' ;}
if($packing == 'true') {echo '<th>'. 'بسته بندی محصول'.'</th>' ;}
if($ryal == 'true') {echo '<th>'. 'قیمت ریالی'.'</th>' ;}
if($dollar == 'true') {echo '<th>'. 'قیمت دلاری'.'</th>' ;}
if($pdate == 'true') {echo '<th>'. 'تاریخ'.'</th>' ;} ?>
我试图将波斯语单词更改为 jtext 以使用覆盖功能使其通过以下代码实现多语言,但出现错误
<table dir="rtl" id="gold-table" class="table table-hover table-responsive" style="margin-bottom: 0"><thead><tr><?php
if($title == 'true' ){echo '<th data-field="forks_count" data-sortable="true">'. 'JText::_( 'COM_PROD_TITLE' );'.'</th>' ;}
if($code == 'true') {echo '<th>'. 'JText::_( 'COM_PROD_SKU' );'.'</th>' ;}
if($cat == 'true') {echo '<th>'. 'JText::_( 'COM_PROD_CAT' );'.'</th>' ;}
if($grade == 'true') {echo '<th>'. 'JText::_( 'COM_PROD_GRADE' );'.'</th>' ;}
if($unit == 'true') {echo '<th>'. 'JText::_( 'COM_PROD_UNIT' );'.'</th>' ;}
if($packing == 'true') {echo '<th>'. 'JText::_( 'COM_PROD_PAKING' );'.'</th>' ;}
if($ryal == 'true') {echo '<th>'. 'JText::_( 'COM_PROD_IRR' );'.'</th>' ;}
if($dollar == 'true') {echo '<th>'. 'JText::_( 'COM_PROD_DLR' );'.'</th>' ;}
if($pdate == 'true') {echo '<th>'. 'JText::_( 'COM_PROD_DATE' );'.'</th>' ;} ?>
感谢您的关注。
我认为你没有分隔文本:
<table dir="rtl" id="gold-table" class="table table-hover table-responsive" style="margin-bottom: 0"><thead><tr><?php
if($title == 'true' ){echo '<th data-field="forks_count" data-sortable="true">'. JText::_( 'COM_PROD_TITLE' ).'</th>' ;}
if($code == 'true') {echo '<th>'. JText::_( 'COM_PROD_SKU' ).'</th>' ;}
if($cat == 'true') {echo '<th>'. JText::_( 'COM_PROD_CAT' ).'</th>' ;}
if($grade == 'true') {echo '<th>'. JText::_( 'COM_PROD_GRADE' ).'</th>' ;}
if($unit == 'true') {echo '<th>'. JText::_( 'COM_PROD_UNIT' ).'</th>' ;}
if($packing == 'true') {echo '<th>'. JText::_( 'COM_PROD_PAKING' ).'</th>' ;}
if($ryal == 'true') {echo '<th>'. JText::_( 'COM_PROD_IRR' ).'</th>' ;}
if($dollar == 'true') {echo '<th>'. JText::_( 'COM_PROD_DLR' ).'</th>' ;}
if($pdate == 'true') {echo '<th>'. JText::_( 'COM_PROD_DATE' ).'</th>' ;} ?>
我的 joomla 站点中有一个模块显示了一个 table 其中包含一些元素,我想使用 joomla jtext 帮助程序将该模块本地化为英语; 默认代码是:
<table dir="rtl" id="gold-table" class="table table-hover table-responsive" style="margin-bottom: 0"><thead><tr><?php
if($title == 'true' ){echo '<th data-field="forks_count" data-sortable="true">'. 'عنوان محصول'.'</th>' ;}
if($code == 'true') {echo '<th>'. 'کد محصول'.'</th>' ;}
if($cat == 'true') {echo '<th>'. 'مجموعه محصول'.'</th>' ;}
if($grade == 'true') {echo '<th>'. 'گرید محصول'.'</th>' ;}
if($unit == 'true') {echo '<th>'. 'واحد قیمت گذاری'.'</th>' ;}
if($packing == 'true') {echo '<th>'. 'بسته بندی محصول'.'</th>' ;}
if($ryal == 'true') {echo '<th>'. 'قیمت ریالی'.'</th>' ;}
if($dollar == 'true') {echo '<th>'. 'قیمت دلاری'.'</th>' ;}
if($pdate == 'true') {echo '<th>'. 'تاریخ'.'</th>' ;} ?>
我试图将波斯语单词更改为 jtext 以使用覆盖功能使其通过以下代码实现多语言,但出现错误
<table dir="rtl" id="gold-table" class="table table-hover table-responsive" style="margin-bottom: 0"><thead><tr><?php
if($title == 'true' ){echo '<th data-field="forks_count" data-sortable="true">'. 'JText::_( 'COM_PROD_TITLE' );'.'</th>' ;}
if($code == 'true') {echo '<th>'. 'JText::_( 'COM_PROD_SKU' );'.'</th>' ;}
if($cat == 'true') {echo '<th>'. 'JText::_( 'COM_PROD_CAT' );'.'</th>' ;}
if($grade == 'true') {echo '<th>'. 'JText::_( 'COM_PROD_GRADE' );'.'</th>' ;}
if($unit == 'true') {echo '<th>'. 'JText::_( 'COM_PROD_UNIT' );'.'</th>' ;}
if($packing == 'true') {echo '<th>'. 'JText::_( 'COM_PROD_PAKING' );'.'</th>' ;}
if($ryal == 'true') {echo '<th>'. 'JText::_( 'COM_PROD_IRR' );'.'</th>' ;}
if($dollar == 'true') {echo '<th>'. 'JText::_( 'COM_PROD_DLR' );'.'</th>' ;}
if($pdate == 'true') {echo '<th>'. 'JText::_( 'COM_PROD_DATE' );'.'</th>' ;} ?>
感谢您的关注。
我认为你没有分隔文本:
<table dir="rtl" id="gold-table" class="table table-hover table-responsive" style="margin-bottom: 0"><thead><tr><?php
if($title == 'true' ){echo '<th data-field="forks_count" data-sortable="true">'. JText::_( 'COM_PROD_TITLE' ).'</th>' ;}
if($code == 'true') {echo '<th>'. JText::_( 'COM_PROD_SKU' ).'</th>' ;}
if($cat == 'true') {echo '<th>'. JText::_( 'COM_PROD_CAT' ).'</th>' ;}
if($grade == 'true') {echo '<th>'. JText::_( 'COM_PROD_GRADE' ).'</th>' ;}
if($unit == 'true') {echo '<th>'. JText::_( 'COM_PROD_UNIT' ).'</th>' ;}
if($packing == 'true') {echo '<th>'. JText::_( 'COM_PROD_PAKING' ).'</th>' ;}
if($ryal == 'true') {echo '<th>'. JText::_( 'COM_PROD_IRR' ).'</th>' ;}
if($dollar == 'true') {echo '<th>'. JText::_( 'COM_PROD_DLR' ).'</th>' ;}
if($pdate == 'true') {echo '<th>'. JText::_( 'COM_PROD_DATE' ).'</th>' ;} ?>