I've been away for a long time, so it may be that things have changed so much that this posting is irrelevant.
But I looked for the change history and didn't find it, so here goes.
I put a lot of work into code to figure out the correct terms for relationships in Spanish, but not long after I provided that code, I remember discovering wrong terms. I hope someone else has also discovered them and fixed them. Si no, ¡lo siento much, mis amigos hispanohablantes!
Since then, I've started learning Chinese, and I just discovered one wrong relationship term in chinese. (My mother's father's father has the term that belongs to my father's father's father.)
I started studying the Chinese terms, and it only took a few minutes into that complicated system to come to the conclusion that attempting to write code in a procedural language to compute the terms for umpteen human languages may not be the best way to go about it. I have ideas for two alternate approaches:
1. A database table: language, relationship, term. Relationship could be the sib/par/spo/dau/etc. used before, except that each three-char link might need another flag for older/younger. When a wrong term is discovered, or a new term needs to be added, then just add/change one or more records in that table. If needed, a new column could be added for factors I don't yet know about that some language might have.
2. A mock family tree for each language, where the NAME of each individual is the relationship term relative to the individual named SELF. When a wrong term is discovered, or a new term needs to be added, then just add/change one or more individuals in that tree. To determine the relationship between to individuals in a real tree, just follow the equivalent path in the mock tree for the current language.
I think the table method would be faster (not certain of that), but it might be slightly harder to maintain. The tree method could allow each webtrees site admin to tweak the terms if he/she so chooses. It would also be slightly more flexible, because if additional modifiers are discovered (for example, an adopted brother's wife gets a different term than a step-brother's wife) it such a relationship could be added. For a language that is particularly complicated, the FAM records could have rules or hints for what to check at that point in the path.
PHP 7.2.15; MySQL 5.6.40; Apache