The reason for this is that I have multiple translations held in a dataset of more than 1300 fields which I want to maintain there and not in the website fields if I use the google transalte functionality. I am calling the function to query the dataset and populate the fields OK in Preview but when I run it in live the queries are not running.
Hi, could you, please, provide your site URL?
@cliffhegan Great! Could you, please, also provide code for the query, that doesn’t work?
@cliffhegan Also make sure your databases are in sync, meaning your data is not only in the sandbox database (which data is being used, when you view the site in preview) but also in the live database (which data is being used on the published site)
Vika. I’m doing a wixdata.query on the table holding the English and Chinese translations. Its the menu items which I want to be able to translate but they will only do so with the Wix Translate functionality. How can I add these items please?
I can see that now you’re using the Horizontal Menu component, which is set up for you automatically. You can use regular buttons instead of it. This way, it’s possible to pass the button labels through Corvid based on user language.
Vika. I did this before but its impossible to get the same menu functionality doing it that way
Vika. What I wish to know is if it is in anyway possible for the menu language to be set from Covid Code as opposed to being set by site language buttons?
I have found a solution in this code
$w . onReady ( function () {
6 let languages = wixWindow . multilingual . siteLanguages ;
7
8 languages = languages . map ( ( obj ) => {
9 return { label : obj . name , value : obj . languageCode };
10 } );
11
12 let currentLanguage = wixWindow . multilingual . currentLanguage ;
13 languages = languages . filter ( obj => obj . value !== currentLanguage );
14
15 $w (‘#languageDropdown’). options = languages ;
16
17 $w (“#languageDropdown”). onChange ( ( event ) => {
18 wixWindow . multilingual . currentLanguage = event . target . value ;
19 } );
20 } );
21
You can use the wixWindow . multilingual . currentLanguage as a variable to pass into the wixdata query and therefore you can use the Wix Menu functionality setting up translations with a database that populates the rest of the website. Therefore problem solved!