Translate problem

i want to translate only one word. it is item.
Shop cart 1 item , 2 items … i want to translate it 1 ürün, 2 ürün…
I edit from theshop.pot but it is not working.

How can translate the word ? perhaps i can make a different file, too…
Also i tried woocommerce.php file. but it didnt work.

Thank you very much.

Hi,

You can change that in woocommerce.php, line 47, in this code:

<a class="cart-contents" href="<?php echo WC()->cart->get_cart_url(); ?>" title="<?php _e( 'View your shopping cart', 'theshop' ); ?>"><?php echo sprintf (_n( '%d item', '%d items', WC()->cart->cart_contents_count ), WC()->cart->cart_contents_count ); ?> - <?php echo WC()->cart->get_cart_total(); ?></a>

and on line 61, in this code:

$items .= '<li class="nav-cart"><i class="fa fa-shopping-cart"></i><a class="cart-contents" href="' . WC()->cart->get_cart_url() . '" title="' . __( 'View your shopping cart', 'theshop' ) . '">' . sprintf (_n( '%d item', '%d items', WC()->cart->cart_contents_count ), WC()->cart->cart_contents_count ) . '-' . WC()->cart->get_cart_total() . '</a></li>';

just change the name item and items, from this part from the code: '%d item', '%d items',

Best Regards,
Csaba

i change but it didnt work… still show as item… i tried item and items --> urun (ürün)

THANK YOU SO MUCH FOR YOUR HELPS.

<?php
/**

  • Woocommerce compatibility
  • @package TheShop
    */

//Check if Woocommerce is active
function theshop_woocommerce_active() {
if ( class_exists( ‘woocommerce’ ) ) { return true; } else { return false; }
}

if ( !theshop_woocommerce_active() )
return;

/**

  • Declare support
    */
    add_action( ‘after_setup_theme’, ‘theshop_woocommerce_support’ );
    function theshop_woocommerce_support() {
    add_theme_support( ‘woocommerce’ );
    }

/**

  • Remove default WooCommerce CSS
    */
    function theshop_dequeue_styles( $enqueue_styles ) {
    unset( $enqueue_styles[‘woocommerce-general’] );
    return $enqueue_styles;
    }
    add_filter( ‘woocommerce_enqueue_styles’, ‘theshop_dequeue_styles’ );

/**

  • Enqueue custom CSS for Woocommerce
    */
    function theshop_woocommerce_css() {
    wp_enqueue_style( ‘theshop-wc-css’, get_template_directory_uri() . ‘/woocommerce/css/wc.min.css’ );
    }
    add_action( ‘wp_enqueue_scripts’, ‘theshop_woocommerce_css’, 9 );

/**

/**

/**

  • Number of columns per row
    */
    function theshop_shop_columns() {
    return 3;
    }
    add_filter(‘loop_shop_columns’, ‘theshop_shop_columns’);

/**

  • Add and remove actions
    */
    function theshop_woo_actions() {
    remove_action( ‘woocommerce_before_main_content’, ‘woocommerce_output_content_wrapper’, 10);
    remove_action( ‘woocommerce_after_main_content’, ‘woocommerce_output_content_wrapper_end’, 10);
    add_action(‘woocommerce_before_main_content’, ‘theshop_wrapper_start’, 10);
    add_action(‘woocommerce_after_main_content’, ‘theshop_wrapper_end’, 10);
    }
    add_action(‘wp’,‘theshop_woo_actions’);

/**

  • Theme wrappers
    */
    function theshop_wrapper_start() {
    echo ‘<div id=“primary” class=“content-area”>’;
    echo ‘<main id=“main” class=“site-main” role=“main”>’;
    }

function theshop_wrapper_end() {
echo ‘</main>’;
echo ‘</div>’;
}

/**

  • Before shop wrappers
    */
    function theshop_before_shop_wrapper() {
    echo ‘<div class=“before-shop clearfix”>’;
    }
    add_action( ‘woocommerce_before_shop_loop’, ‘theshop_before_shop_wrapper’ , 10 );

function theshop_after_shop_wrapper() {
echo ‘</div>’;
}
add_action( ‘woocommerce_before_shop_loop’, ‘theshop_after_shop_wrapper’ , 40 );

/**

  • Archive titles
    */
    function theshop_woo_archive_title() {
    echo ‘<h3 class=“woo-title entry-title”>’;
    echo woocommerce_page_title();
    echo ‘</h3>’;
    }
    add_filter( ‘woocommerce_show_page_title’, ‘theshop_woo_archive_title’ );

Also how i can download this %37 translate turkish docs.

https://translate.wordpress.org/locale/tr/default/wp-themes/theshop

i can not download

Hi,

Please post a link to your website, so I can check why the translation haven’t worked.

Best Regards,
Csaba

i solved the problem the problem is about cookies… but removed the cart from templated and installed a new cart plugin.
Thank you so much.

Also I have a problem with a woocommerce plugin .
I wrote forum of plugin. they very late and still not interested with my problem.
if you can small help me about with that. i will tell you plugin name and mywebsite adress if you accept to free help.

Thank you so much.

i solved plugin problem. not necessary help. thank you very much.

Hi,

Great! I’m glad it’s resolved! If you need help with anything else, please open a new topic.

Have a nice day!

Best Regards,
Csaba