Language Translations in Tree View (Vision)

I have an existing project in Vision that I am redeploying to Mexico so I'm adding Spanish translations. I'm using the Translate() function on my labels and multistate indicators, but I'm really struggling with the Tree View that is used for navigation.

I think I've determined that I need to translate the values in the Tree View dataset in the columns for "path" and "text", but how? This surely must be a common need, so is there a best practice on this? I feel like I'm missing something simple and obvious.

How have any of you approached this?

If you're building the tree with a script, maybe system.util.translate is what you're looking for:

1 Like

My Tree is relatively static and simple, so I just type the required data into the component dataset. It doesn't have very many levels and the levels are not very deep, so my entire dataset is only about 20 rows long.

What options do I have in this scenario?

You could use a cell update binding to various custom properties that use the translate expression function:

Thanks Paul, I think I can imagine how I might do that.....I need to try some things to understand this.

Is it unusual for the Tree View dataset to NOT be build by script? I would love to see sample code for how to build it dynamically if anyone can share that.

This actually worked really well! Thanks!!

1 Like