* how to print approximate dates in other language

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
avatar
piotao
Gold
Posts: 18
Joined: 28 Aug 2018 14:09
Family Historian: V6

how to print approximate dates in other language

Post by piotao »

Hi,
I didn't found that in the forum nor on google, so here's the question.

I have a date format defined as follows:

Code: Select all

=TextIf(Year(%INDI.BIRT.DATE:XDATE1%) = Year(%INDI.BIRT.DATE:XDATE2%),Year(%INDI.BIRT.DATE:XDATE1%),%INDI.BIRT.DATE:ABBREV4%)
This expression is working nicely and it is generating dates as year, no matter if the whole date was entered or single year only.
And it works great only when date is entered as a valid date. When date is entered approximately either as "before 1900" or as "circa 1900", then on my output additional word appears, "bef" or "c", which I would like to change to another word more suitable to the language I'm working on ("przed" and "około" respectively). How to do that?

Simply put, I don't know where/how to change prefixes or suffixes added to date by the program when date is not exact. Maybe there is something in configuration which I have overlooked?
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: how to print approximate dates in other language

Post by tatewise »

No, you have not overlooked any settings. FH does NOT currently support foreign languages in any way at all.

With your expression circa Dates (and also Approximate, Calculated & Estimated Dates) only produce the Year.
Also Quarter Dates only produce the Year.

So the only ones you need to translate are Range Dates (before, after & between) and maybe Period Dates (from & to).
That will need a nested test for every XDATETYPE such as:

Code: Select all

TextIf(%INDI.BIRT.DATE:XDATETYPE%="After", Text("po " . Year(%INDI.BIRT.DATE%) ), TextIf(%INDI.BIRT.DATE:XDATETYPE%="Before",Text("przed " . Year(%INDI.BIRT.DATE%)), TextIf(%INDI.BIRT.DATE:XDATETYPE%="Between",Text("pomiędzy " . Year(%INDI.BIRT.DATE:XDATE1%) . " i " . Year(%INDI.BIRT.DATE:XDATE2%)), %INDI.BIRT.DATE:ABBREV4% )))
and insert that where you currently have just %INDI.BIRT.DATE:ABBREV4%.

So the full expression coping with just After, Before & Between would become:

Code: Select all

=TextIf(Year(%INDI.BIRT.DATE:XDATE1%)=Year(%INDI.BIRT.DATE:XDATE2%), Year(%INDI.BIRT.DATE%), TextIf(%INDI.BIRT.DATE:XDATETYPE%="After", Text("po " . Year(%INDI.BIRT.DATE%) ), TextIf(%INDI.BIRT.DATE:XDATETYPE%="Before",Text("przed " . Year(%INDI.BIRT.DATE%)), TextIf(%INDI.BIRT.DATE:XDATETYPE%="Between",Text("pomiędzy " . Year(%INDI.BIRT.DATE:XDATE1%) . " i " . Year(%INDI.BIRT.DATE:XDATE2%)), %INDI.BIRT.DATE:ABBREV4% ))))
But that needs to also cope with From, To & From/To.
See the Help at the end of Date Formats for details.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
piotao
Gold
Posts: 18
Joined: 28 Aug 2018 14:09
Family Historian: V6

Re: how to print approximate dates in other language

Post by piotao »

Brilliant!!!
Thank you, this solution works like a charm. In fact, it's now a quite a code fragment... :)
Post Reply