因此,在俄语中,在Woocommerce重量和其他公制系统的设置中。但在产品页面中,例如它仍然以英语(g - gramm)显示。我已将文件复制到我的主题中:我应该在此文件中执行哪些操作才能以俄语显示正确的重量公制系统?此代码没有帮助:/wp-content/themes/my_theme/woocommerce/single-product/product-attributes.php
<td class="product_weight"><?php echo wc_format_localized_decimal( $product->get_weight() ) . ' ' . __(esc_attr( get_option( 'woocommerce_weight_unit' ) ), 'woocommerce'); ?></td>
代码 :/product-attributes.php
defined( 'ABSPATH' ) || exit;
if ( ! $product_attributes ) {
return;
}
?>
<table class="woocommerce-product-attributes shop_attributes">
<?php foreach ( $product_attributes as $product_attribute_key => $product_attribute ) : ?>
<tr class="woocommerce-product-attributes-item woocommerce-product-attributes-item--<?php echo esc_attr( $product_attribute_key ); ?>">
<th class="woocommerce-product-attributes-item__label"><?php echo wp_kses_post( $product_attribute['label'] ); ?></th>
<td class="woocommerce-product-attributes-item__value"><?php echo wp_kses_post( $product_attribute['value'] ); ?></td>
</tr>
<?php endforeach; ?>
</table>
谢谢!
开心每一天1111
手掌心
随时随地看视频慕课网APP