Translate typing text (Type.js) with Weglot extension

Hello to all :wave:,

I put a message on the forum because I currently have a problem on the site of a client, I use to display a title a custom code typed.js to animate it and in parallel the extension Weglot to translate the site from French to English.

The problem is : the animated text does not translate, I would have to modify the custom code to take into consideration the change of language when I press the Weglot button. Does anyone have a solution to this problem?

Here are the elements to help you understand my problem:

  1. Here is the code I am currently using (which I put in the before tag):
<script src="https://cdnjs.cloudflare.com/ajax/libs/typed.js/2.0.10/typed.min.js"></script>

<script>
  var typed = new Typed(".typed-words", {
  strings: ["Hello, my name is John.", "Hello, my name is Lisa.", "Hello, my name is Beetlejuice."],
  typeSpeed: 40,
  backSpeed: 40,
  backDelay: 800,
  startDelay: 500,
  loop: true,
  showCursor: false,
  cursorChar: "|",
  attr: null,
});
  1. Here is my site Read-Only: Webflow - followinvest.fr

Thanks in advance for your help! :pray:

Roland

1 Like