Translate function in text convertor is needed

It'd be nice to have a separate function to translate the text field for eg: $tc(translate, df(EEEE), hi)$ will translate from default language en in most cases to hi or any other language.

General code : $tc(translate, function/txt, language code)$

You can use this for language code: link

This would be helpful to get a particular text in a particular language instead of changing the whole app language.

How do I do this for the day of the week in Spanish?

As far as I know, there is no function for translation built into Kustom.

No native function, but should be possible manually. Something like $if (df(e) = 1, Lunes)$

This is what I have “Sdf(EEEE)$” but how can I make it do it automatically with “$if (df(e) = 1, Lunes)$”?

You can use $if (df(EEEE) = Monday, Lunes)$, but $if (df(e) = 1, Lunes)$ for me looks cleaner. Both should return the same results.

Hi there,

I would suggest you the following code snippet, I hope it would be easier and more flexible to use.

Create a global variable to store a list of weekdays in Spanish âžž i.e. weekdays

The value of this weekdays global variable is

Lunes,Martes,Miércoles,Jueves,Viernes,Sábado,Domingo

Then you could use the following code snippet to get today’s weekday name in Spanish.

$tc(split, gv(weekdays), ",", df(e))$

I hope this would help.
:smiling_face::+1: