我正在嘗試使用 php 過濾器(add_filter() 函數)將我的 WooCommerce 頁面翻譯成我的母語。我得到了一個例子,我抓住了一個頁面的鉤子,用它來輕松地翻譯一個按鈕,沒有任何問題。add_filter('ultimate_woocommerce_auction_bid_button_text', 'woo_custom_bid_button_text');function woo_custom_bid_button_text() { return __( 'P?ihodit', 'woo_ua' );}“P?ihodit”是我的母語“Place bid”的翻譯。問題是當我想翻譯“投標價值”按鈕前面的部分時這是 WooCommerce 源代碼: <div class="quantity buttons_added"> <label for="uwa_your_bid"><?php _e('Bid Value', 'woo_ua') ?>:</label> <input type="number" name="uwa_bid_value" data-auction-id="<?php echo esc_attr( $product_id ); ?>" value=""min="<?php echo $product->woo_ua_bid_value() ?>" step="any" size="<?php echo strlen($product->get_woo_ua_current_bid())+2 ?>" title="bid" class="input-text qty bid text left"> </div>我已經嘗試過使用與上面相同的方法:add_filter('ultimate_woocommerce_auction_before_bid_button', 'woo_custom_text_before_bid_input'`enter code here`);function woo_custom_text_before_bid_input() { return _e('P?íhoz', 'woo_ua');}但是我不能讓它工作,因為沒有特定的鉤子可以使用。提前感謝任何回復或解決方案。
- 1 回答
- 0 關注
- 155 瀏覽
添加回答
舉報
0/150
提交
取消