Go to Juicer

Juicer.io Support Center

Search for any help questions or topics.

Translating buttons within your Juicer feed

Avatar
Mario
Updated 1 year ago

If you'd like to display the “Load More” button or other buttons in a language other than English, you can use JavaScript to do so.

 

Certain parts of a Juicer feed are in English, such as the “Load More” button. If you'd like this to appear in a different language, the text can be changed with some programming work.

The change requires using JavaScript. So, it makes use of the data-after attribute, which allows you to run JavaScript after the Juicer feed has rendered.

Here is an example that would alter the text of the “Load More” button. First, let's add a data-after attribute to your feed, like this:

 

Standard Website

<ul class="juicer-feed" data-feed-id="YOUR_FEED_NAME" data-after="translateJuicer()"></ul>
 
WordPress
[juicer name="YOUR_FEED_NAME" data-after="translateJuicer()"] 
 
⚠️ "YOUR_FEED_NAME" is where the specific ID of your Juicer feed appears, which is already included in your embed code.
You can further customize your code above by adding any needed data attributes.

❗ Make sure you don't mix single and double quotation marks.
[juicer name='YOUR_FEED_NAME' data-after="translateJuicer()"] 
[juicer name="YOUR_FEED_NAME" data-after="translateJuicer()"] 
 
❗ Make sure you don't use your full feed URL instead of your feed name.
[juicer name="https://www.juicer.io/embed/YOUR_FEED_NAME" data-after="translateJuicer()"] 
[juicer name="YOUR_FEED_NAME" data-after="translateJuicer()"] 
 
Next, let's write a simple JavaScript function that will change the text of the Load More button. This function should be inserted after your embed code on the webpage, regardless of whether you're using a standard website or a WordPress one.
 
<script type="text/javascript">
  function translateJuicer() {
  jQuery('.j-paginate').text("Load More in another Language")
  }
</script>
 

In this case, you would replace “Load More in another Language” with the exact translated version of “Load More” that you want to appear.

This is just one example, and you and your development team can write other JavaScript to translate other areas of the feed.

 

If you have any questions or need any help, please email us at hello@juicer.io.

Did this answer your question?
😞 😐 😃