For a recent multilingual project, we used Beaver Builder for the site build and TranslatePress for the languages. As the project progressed, we received a new requirement to make PDF download links available in multiple languages. We had various buttons and link modules used throughout the site. While TranslatePress provides conditional shortcodes, these would only work within an HTML block – not the aforementioned button and link modules.

As such, we upgraded to using Beaver Themer which allows for modules to be displayed based on conditional logic. One of the conditions available is based on a site Cookie. TranslatePress determines the language based on the URL so we had to write a mini WordPress plugin to set the current language to a Cookie value. See below:

With this mini plugin installed, it will start adding a new Cookie called “language” and set the currently selected (or default) language the user is looking at.

Then, for individual modules like buttons you can set the conditions for when it will show (notice this initial conditional is for “en_US” OR not Cookie yet set to making this the default button).

Then you can duplicate the module and change the conditions for each language: