vesta-webtrees-2-custom-modules / vesta_shared_places

⚶ Vesta Shared Places (Webtrees 2 Custom Module)
https://cissee.de/
GNU General Public License v3.0
13 stars 3 forks source link

Enhancement: support for LANG tag in _LOC records #77

Closed hartenthaler closed 3 years ago

hartenthaler commented 3 years ago

GEDCOM Addendum says

0 @<XREF:_LOC>@ _LOC {1:1}
1 NAME <PLACE_NAME> {1:M}
2 DATE <DATE_VALUE> {0:1}
2 ABBR <ABBREVIATION_OF_NAME> {0:M}
3 TYPE <TYPE_OF_ABBREVIATION> {0:1}
2 LANG <LANGUAGE_ID> {0:1}
...
<LANGUAGE_ID> := {Size=1:15} (Language Identification) All languages listed in 5.5.1 are accepted.

Up to now, this module does not support the tag LANG. It would be nice if a user which prefers for example "English" in his browser/webtrees language, will get the English location name if this one is specified in the _LOC record for the relevant time period. Up to now (when I'm right) the first specified name is used.

I see a problem related to the coding of languages. Addendum and GEDCOM 5.5.1 are using English language names. GOV is using ISO 639-2B (with the exception for German = deu and not ger). Browser language codes (HTML) are based on ISO 639-1.

By the way: I would prefer 2 LANG <LANGUAGE_ID> {0:M} instead of 2 LANG <LANGUAGE_ID> {0:1}

Screenshot (337)_LI

ric2016 commented 3 years ago

I see a problem related to the coding of languages.

Implementation note: Mapped in webtrees (incompletely) via https://github.com/fisharebest/webtrees/blob/main/app/Elements/LanguageId.php.

Edit: This mapping doesn't seem useful for an edit control, because it returns endonyms (name of the language in that language itself), which isn't helpful in this case.

There doesn't seem to be I18N strings for these in webtrees, so we'd have to add them in the custom module. I'm not sure that is the best way to proceed.

ric2016 commented 3 years ago

Added in Release 2.0.16.1.1. Better I18N support for the language names will hopefully be forthcoming in webtrees itself.