I know the question has been asked before but I didn’t find any clear answer or roadmap.
I built my website using a collection database, to display dynamic content, only to realize at the end that it barred me from using wix multilingual to add new languages to my website.
Has anyone found a workaround? Otherwise is it doable with code, and could you point me to someone who could develop that for me? There are some other options such as using “weglot”, but that doesn’t seem to translate URLs which is bad for SEO.
It is possible to interact with Wix Multilingual with code using the Multilingual API within the wix-window API but Wix Multilingual has to be active to use any multilingual code.
If you are having an issue enabling Wix Multilingual, I suggest contacting Wix Support .
What are you trying to do, are you trying to set multilingual SEO values for a dynamic page? Please give more details.
You can submit your project to Wix Marketplace and they’ll find a developer for you, or if you prefere, you can contact me (links in my profile) to help you.
Basically i would like to use the features of Wix multilingual on my website which uses dynamic content. The problem is that in the documentation, it is clearly stated that wix multilingual doesn’t work on websites using collections. So i’m stuck there for the moment. Any solution, including custom development, is welcome.
I don’t know how much Wix Marketplace charge, you can submit your project to them and they’ll get back to you, and if you’re asking me, I don’t know either, please use the links in my profile to contact us.
In general, any developer will ask you a few questions to know more about the project to be able to give you an estimate.
@cedric and @Dara, since multilingual enables menu items specific to each language and enables unique links for each language, can’t you create separate dynamic page category pages for each language and either connect to separate collections (same content in different languages) or use different filters in the dataset on a “language” field (so that the same content in different languages is in a single collection)? The Item pages will then display the desired content in the correct language.
I have a similar issue… I have a website with dynamic pages and multilanguage (4 languages).
The way I handle is to add another column in the collection for each different language (i.e. TitleEN, TitleRO, TitleDE, etc.), and depending on the current language:
Hi Laszlo! Thank you for sharing your code, I’m trying it but can’t make it work cause something is missing and I’m too new at code to understand what.
This is my code:
if (wixWindow.multilingual.currentLanguage === 'es') {
$item("#idioma").text = itemData.holaEs;
}
else if (wixWindow.multilingual.currentLanguage === 'en') {
$item("#idioma").text = itemData.holaEn;
item and itemData are underlined, and when I hover them it says "Cannot find name ‘itemData’/ "Cannot find name ‘item’ ".
What is missing before the If statement in order to call those terms?
I’ve seen examples of the code but only for repeaters:
import wixWindow from 'wix-window';
import wixData from 'wix-data';
$w.onReady(function () {
let language = wixWindow.multilingual.currentLanguage;
$w("#dataset1").setFilter( wixData.filter().eq("language", language) );
});
Make sure that your Collection has a “language” column, where you mark the content language (en, de, es…) So each item needs to be in the collection multiple times in the respected languages.
If you are using a repeater to show the content, make sure to create a “onItemReady” for the Repeater and use this as well:
export function repeater1_itemReady($item) {
let language = wixWindow.multilingual.currentLanguage;
$w("#dataset1").setFilter( wixData.filter().eq("language", language) );
}
This will prevent content load issues, that will leave the translation filter behind.
Hey, im at the same point as you are here - did you or anyone manage to crack this? I’m very new to all this so any information or ideas are very welcome! thanks
thank you for your code. I did manage to get the first part working.
Please could you also provide a full example of the " onItemReady " for the Repeater? And also if the " repeater1_itemReady " needs to be replaced as well like the " #dataset1 " part?
Hi everyone - just wanted to share that I’ve managed to get Pavel’s implementation going with a few simple tweaks. Here’s a step-by-step process on how to do this, and a video will be posted on my youtube channel shortly to demonstrate: https://lazarinastoy.com/how-to-translate-content-collections-with-wix/
URL with step-by step process: lazarinastoyDOTcom + how-to-translate-content-collections-with-wix