Text elements in repeater do not change the language.

Hi,
I don’t know if I’m the only one with this problem.
I created a text element in repeater . I entered the text, went but another language version of the site and translated the text.
but in the preview and the published site shows the inscription in only one language and does not change.
Maybe someone has encountered ? how to fix it ?

2 Likes

https://support.wix.com/en/article/translatable-content-in-wix-multilingual

What can’t be translated?

At present, you cannot translate content found in:

  • Most Wix business solutions (Wix Hotel, Wix Bookings, Wix Restaurants etc.)

  • Wix apps (Wix Blog, Wix Forum, etc.) and third-party apps. Vote for this feature

  • Members Area

  • Content added using Corvid by Wix

  • Database content on dynamic pages, repeaters etc. Vote for this feature

  • Old contact form/Get Subscribers form. You should replace these with Wix Forms which can be translated.

  • Old lists


In the main version of the site the text field is assigned a value in Russian


In the German version of the site, the text field is assigned a value in German

But both in the preview and on the omitted site, the translated text boxes remain in Russian


And it’s not dynamic content

This forum is dedicated to Corvid. For questions that are not related to code you can contact Wix Customer Care . You’ll get better help for your problem there.

I’m sorry, I hadn’t thought of that.
I use a lot of code on the page and thought about it.

As a result, I solved the problem by specifying the meaning of text elements in the code, separately for each language version of the site

$w( “#repeater1” ).onItemReady(($item, itemData, index) => {
$item( ‘#text68’ ).text = ‘Beginn :’ ;
$item( ‘#text70’ ).text = ‘Dauer:’ ;
$item( ‘#text71’ ).text = ‘Kursumfang:’ ;
$item( ‘#text72’ ).text = ‘Unterrichtszeit:’ ;
$item( ‘#text89’ ).text = ‘Kursgebühr:’ ;
$item( “#text67” ).text = itemData.veranstaltungsNameDe;
$item( ‘#text94’ ).text = itemData.artDe;
$item( ‘#image9’ ).src = itemData.sqimageDe;
$item( ‘#text92’ ).text = itemData.umfangDe;
$item( ‘#text93’ ).text = itemData.zeitDe;
});

Didn’t mean to “push you off”, but it sounded as if the text you were talking about was configured by the Wix Multilingual feature. However, I’m glad to see (in your other comment) that you got it worked out. Sometimes, brute force works.

1- add language column in the dataset
2- duplicate the information in another row with preferred language
3- check the selected language
4- filter the dataset as per selected language

import wixWindow from 'wix-window';
import wixData from 'wix-data';
import {session} from 'wix-storage';
import wixLocation from 'wix-location'; 

$w.onReady(function () {

 let locale = wixWindow.multilingual.currentLanguage;  // "en-US"
 
 if (locale === "en"){
 // $w('#dataset1').setFilter( wixData.filter().eq("language", "EN"));
        $w("#dataset1").setFilter(wixData.filter()
        .contains("language", "EN"));
        $w('#priceLabel').text = "Price/Person";
        $w('#reaminingSeatsLabel').text = "Remaining Seats";
        $w('#addressLabel').text = "Address";
        $w('#registerButton').label = "Register";
 
    } else {
        $w("#dataset1").setFilter(wixData.filter()
        .contains("language", "AR"));
 
    }
 

});


Thank you so much Ashraf, it works perfect for me, with my Dataset :wink: Of course you increase the lines in your database, but for the moment, it’s fine for me :wink: