Hi there, I'm a bit new to Retool. I'm trying to display item names in languages (Eng/Viet) and I'm having a hard time trying to dynamically change item's name. My Collection View's data source has a column for the item's English name and another column for the item's Vietnamese name and I wanted the Collection View to dynamically change it's title based on the localStorage's language.
So far I have typed JS right into the Title input as {{ if (localStorage.values.Language == "English") {item.Item_Name} else if (localStorage.values.Language == "Tieng Viet") {item.Viet}}}
. And it doesn't display because it's not working
I've also tried to make a temporary state as itemNameViet
and tried to run a JS code in many ways and this is the best I can manage even though it can't be read. How can I improve my syntax?