Home Forums WoodMart support forum Setup automatic currency and theme translation

Setup automatic currency and theme translation

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #657145

    fb
    Participant

    Hello team,

    May I ask for detailed instructions on how to setup the following points:

    1. Automatically detect currency based on user location / IP.

    2. Possibility for user to switch currency in the Theme header.

    3. Theme translation: what is the difference between the build in translation (https://xtemos.com/docs-topic/theme-translation/) and WPML translation (https://xtemos.com/docs-topic/how-to-make-woodmart-multilingual-with-wpml/).
    Ideally, I need the whole website to be translated, including product and category pages.

    4.

    #657190

    Luke Nielsen
    Keymaster

    Hello,

    1. Currency is the Woocommerce functionality, and WoodMart does not provide any option to change currency somehow. You will need to search for a plugin for this purpose.

    You can try this one: https://wordpress.org/plugins/woocommerce-currency-switcher/

    Or you can use the built-in currency switcher from WPML – https://wpml.org/documentation/related-projects/woocommerce-multilingual/multi-currency-support-woocommerce/

    2. You can take the shortcode for the currency switcher and insert it in the Text/HTML block in the Header builder.

    https://xtemos.com/docs-topic/woodmart-header-builder/

    3. WPML is a multilingual plugin which means you can translate the site for different languages. Another translation is via the .mo and .po files, which means you can translate the site to 1 language only.

    Kind Regards

    #657777

    fb
    Participant

    Hi Luke,

    Thanks for the comments!

    We tried placing the currency switcher shortcode in the header menu via Text/HTML element and it works only half way:

    1. Once a new currency is selected, the dropdown is not always refreshed to show the new currency. How can this be fixed?

    Notes:
    – The currency in the built-in cart element is successfully changed after new currency is selected. We need the same for the currency dropdown.
    – If we open developer tools, the currency dropdown is refreshed most of the time (not always though).
    – We are not using WPML only the standalone WooCommerce Multilingual & Multicurrency plugin.

    Here is the functions.php code for the currency switcher:

    function custom_currency_switcher_shortcode() {
        ob_start();   
    	do_action('wcml_currency_switcher', array('format' => '%symbol%'));
        return ob_get_clean();
    }
    add_shortcode('currency_switcher', 'custom_currency_switcher_shortcode');
    

    We placed this shortcode [currency_switcher] in a Text/HTML element in the Header.

    • This reply was modified 2 weeks, 5 days ago by fb.
    #657796

    Luke Nielsen
    Keymaster

    Hello,

    On my end it works well, here is a video – https://dropmefiles.com.ua/en/good/h96EZT7BR/eYxyhZc

    Could you please send a video from your end? Also, send access to the admin panel.

    Kind Regards

Viewing 4 posts - 1 through 4 (of 4 total)