Multi language the easy way in Wix Code

I have several clients that needs true multi language support on their pages and the built in Wix one doesn’t do the trick for us. So I decided after waiting for something else to test an idea on my own.

The concept is actually really easy but not perfect in any way. I went with the idea of looping through all the elements on a page, testing if it is a text or button. Then look up the id in a data collection, get the translation and return the correct text or label for that language.

This could be done in a better way I am sure, but this works really good for us. It also provides a really simple way for our clients to change and administer text and labels on pages done for them through the database app.

I decided to make the code and everything freely available on Wix Show for you all. The code is inside our Code Library and the video can be found in the Videos section.

The blog post is here:
https://www.wixshow.com/blog/multilanguage-in-wix-code-made-easy

The video is here:
https://www.wixshow.com/videos/

Everything is free for you to use, recode and do whatever you want with it. Please comment below if you like it or have any thoughts on making it a better solution.

2 Likes

Hi Andreas, thanks so much for sharing this solution. I had tried it and it worked pretty well on a single page. However I kind stuck of using this concept for the navigation on other pages. Can you help me and give me some suggestions?

Thanks a lot in advance.
Grace

Does it work on the first page but not on the other ones you mean? Then you maybe did not set the pageID in the code.

Thanks a lot for replying.

I have 5 menu buttons for 5 page with two languages. Since the menu buttons can’t be set as show on all pages and that means I have to create 50 items in the database. I felt it’s not a good way to do it. So I tried to create different databases for each page because in that way at least i can use export/import database to save time and also it would be easier to manage. But it didn’t work. That’s why I am looking for a better solution for the menu buttons.

Also I saw you are able to do the duplicate a row of database in your video. May I know how to do that?