Is there a way to change the language of the date in a text field?
%<DocumentText("data")>% returns dates in english which is the language rhino is currently set to. But I would like to have them in my language, with out having to do it manually or changing Rhino interface to portuguese. Is this possible?
Hi - that is not currently possible, no.
I asked for locale-specific output in RH-42961 a while back but that is on hold pending - as I read it - user demand. I will add your request to that item.
(Note that the relevant comments in that issue are not visible to the public because of the way YouTrack works. When an example including a GUID is given in the text, YouTrack automatically sets visibility to Developers-only because it reads those GUIDs as license keys)
Are you storing a date in your document user text?
I was. In the meantime I learned that there is no need to do that. I can just call current time directly. But it will be useful for other purposes, such as keeping dates of project phases.
Thanks! Its a make or break feature. I can’t deliver documents to customers and municipalities with dates in a foreign language!
@Trav we could probably handle functions like Date by providing an overload that accepts a language tag. Something like
Date("", "es-ES") to format for Spanish
Would that make sense?
That would be amazing! Support for pt-PT, please
Yeah, we could do that as an over load or just have the date time return correctly for the current culture.
The date currently uses the culture that Rhino’s appsettings are set to. I’ve been thinking about a possibility of a new document property that forces all text field evaluations to use a specific culture, but even if we added that having an overload that forced a specific language wouldn’t get in the way.
I’ll try to type this up and let you test it out.
RH-57362 is fixed in the latest WIP
RH-57361 is fixed in the latest WIP