Navigation

    APPDRAG Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular

    REMINDER

    Please be respectful of all AppDragers! Keep it really civil so that we can make the AppDrag community of builders as embracing, positive and inspiring as possible.

    GALLERY IMAGE / TRANSLATION

    Cloud CMS (Pagebuilder, Blog, Shop, Newsletters, Code Editor)
    2
    6
    437
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Katya Nakache
      Katya Nakache last edited by

      Hi !!
      Is it possible to change the pictures in the gallery depends on the language of the website ?

      Ex : I got books in russian and in english, I would like the english pictures appears when the language is in english... and in russian when the language is in russian... etc...

      I got 5 languages... 🙂

      Thankssssssssssssss

      1 Reply Last reply Reply Quote 0
      • Wassim
        Wassim last edited by

        Hi Katya,

        Natively no but there are some easy solutions do to it using code. I'm sure you'll succeed if you follow this step by step :

        1 - Duplicate your gallery to have one gallery per language and set the right images for each (and or content)

        1.jpg

        2 - On your gallery click on the brush and go to Advanced

        795de572-60cf-4a5a-a1a9-708f24dce5ec-image.png

        3 - Set an id for each of them starting with "gallery-" with the correct country codes en, fr, iw, ru, es

        68b969c4-68e4-47c1-94df-d41bcb56a762-image.png

        4 - When your galleries are setup drag & drop a jQuery Source code element below

        057be2d6-18dd-48cb-ad86-50ad33c9b353-image.png

        5 - Double click on the grey box to open it and replace all the content with this code

        <style>
            #gallery-en:not(.gallery-visible), 
            #gallery-fr:not(.gallery-visible), 
            #gallery-es:not(.gallery-visible), 
            #gallery-ru:not(.gallery-visible), 
            #gallery-iw:not(.gallery-visible) {
                display:none!important;
            }
            
        </style>
        <script appdrag-embed="true">
            //Wait for jquery to load before executing code
            addEventListener('JqueryLoaded', function(e) {
        
                //Type or paste your jquery code here
                $("#gallery-" + store("lng", undefined, true)).addClass("gallery-visible");
        
            }, false);
        </script>
        

        6 - Tada in english

        9bde9d52-a3e6-4613-ab46-71be7f955a7b-image.png

        ... and in french

        61b1e40f-bd32-44b9-94ed-3e6690e5db89-image.png

        (notice that I only changed the legend but I could change the image as well)

        1 Reply Last reply Reply Quote 0
        • Katya Nakache
          Katya Nakache last edited by

          Wouah !!!!! It's going to be my sunday task !
          I let you know !!!!
          Thank you 🙂

          1 Reply Last reply Reply Quote 1
          • Katya Nakache
            Katya Nakache last edited by

            Hi Wassim,

            Fisrt of all... I tried to follow your instructions... but it didn't work 😞 I don't know where is my mistake... but I'll work again on it !!!

            Now my client wants to change the pictures in the SHOP according to the languages 😢
            Is it possible? with the same way ?
            Need to program ?

            1 Reply Last reply Reply Quote 0
            • Wassim
              Wassim last edited by

              @Katya-Nakache said in GALLERY IMAGE / TRANSLATION:

              Hi Wassim,
              Fisrt of all... I tried to follow your instructions... but it didn't work I don't know where is my mistake... but I'll work again on it !!!
              Now my client wants to change the pictures in the SHOP according to the languages
              Is it possible? with the same way ?
              Need to program ?

              Hi,
              Try again and share your link if that doesn't work.
              Well for the shop you can't do it, it would require some code yes.

              1 Reply Last reply Reply Quote 0
              • Katya Nakache
                Katya Nakache last edited by

                All right !
                Coming soon 🙂

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post