• Resolved jgjador

    (@jgjador)


    Hi,

    What would be the css coding if I want downloadable file to match the language the user selects. I have created product variation english and french. I could even hide the product variation.

    I don’t know the css coding. If someone could help me, I would really appreciate.

    I am using woocommerce.

    Thanks!

    • This topic was modified 2 years, 6 months ago by jgjador.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Alex

    (@alexcozmoslabs)

    You can enable the Force language in custom links option from TP Settings –> General tab. This will force links without language encoded to keep the currently selected langauge.

    Or, do you want to have different files for different languages?
    If so, you can use our Conditional Shortcode Based On Language to display different content for different languages https://translatepress.com/docs/translation-shortcode/, or if your website is built with Elementor, you can restrict the modules based on language using our Restrict by Language integration: https://translatepress.com/docs/restrict-by-language/elementor-integration/.
    Also, we have similar integrations with Oxygen Builder, https://translatepress.com/docs/restrict-by-language/oxygen-builder-integration/, and WP Bakery, https://translatepress.com/docs/restrict-by-language/wpbackery-integration/.

    Thread Starter jgjador

    (@jgjador)

    Hi Alex,

    Thanks for your reply.

    I’ve variable product English downloadable and french downloadable using in every single product a drop down list select language English or French. What I would like to do is Translatepress select language for the site would also automatically select the variable product to that language. Then I can hide the select language in every product. On the shop page I would have to change to button ‘Select options’ to ‘add to chart’

    I hope this makes more sense.

    Thanks,

    Johanne

    Thread Starter jgjador

    (@jgjador)

    Hi,

    I would like to do something like this

    If body.translatepress-fr_FR
    then .product-type-variable =’FRENCH’
    Else
    If body.translatepress-en_EN
    then .product-type-variable =’ENGLISH’

    I don’t know exactly the coding. But it would look something like that.

    Then I can hide the select language in single product. I would have to change the ‘Select options’ button to Add to cart.

    Thanks!

    Thread Starter jgjador

    (@jgjador)

    Done

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘downloadable file to match the language the user selects’ is closed to new replies.