Hey!
I wanted to share an early feature we are just finishing off.
Its 3 parts:
- Local Variables. These work like Global Variables but can be assigned to a Localized String. This also means you can preview in the Editor without playmode!
- LocalizedStrings can now be used as Global and Local Variables. This is how you create nested translations.
For example if we wanted to show some text to say
The {item} is {something}
We could define our item like so:
In English we would say:
The {item} is red.
In Spanish we could say
El {item} es rojo
This brings up a problem though. in Spanish items have gender and these genders can change the sentence.
For example a male item would be :
El {item} es rojo
and female:
La {item} es roja
This brings us to the third feature
- you can now access an entries metadata in a Smart String. We can then add the gender to the entry for the item like so:
and access it with {localizedString Name.gender}
Combine this with the choose operator and we can now handle gender in the example like so:
{item:{gender:choose(Male|Female):El|La} {} es {gender:choose(Male|Female):rojo|roja} }
We could also write it as {item.gender:choose(Male|Female):El {item} es rojo|La {item} es roja}
Which is probably simpler
We are just adding the final touches and hope to have this in the next release.
Edit:
This will be available in 1.0.0