Change the text if the site is in another language

Hello, I’m new to coding so I’m struggling with some very easy stuff.
I’m building a website that with a little coding: when the mouse hovers an image of a man/woman, it changes the text in a text box to man/women.

export function columnF_mouseIn(event) {
 //Add your code for this event here: 
    $w("#MFtxt").text = "F";
}

The problem is that I’m building a bilingual site and I need the text to change accordingly. Basically I need a code that says “If the language is english, the text becomes WOMEN; if the language if Portuguese, it changes to FEMININO”. I don’t know how to work with IFs yet, but I know there’s the wix-window.multilingual API to help me achieve that.

Thank you very much!

Hi Joaohess

Read this here and try to understand how it works. If you need further support comment below.

Got it

import wixWindow from 'wix-window';

export function columnF_mouseIn(event) {
 //Add your code for this event here: 

 let language = wixWindow.multilingual.currentLanguage; // "en"
 if( language === "en") {
        $w("#MFtxt").text = "W";  //do this thing
        }
 else if( language !== "en") {
        $w("#MFtxt").text = "F";  // or else do this other thing
        }

}

Super. Now you have become a coder.:grinning::clap: