geonetwork / geonetwork/core-geonetwork
iso19139 multilingual template shows "null" for certain languages
- Dominant language
- Java
- Stars
- 521
- Forks
- 514
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 19
Description
The problem seem the language code used for example for German in the template `#GE`, but the code that manages the translation from iso2code to iso3code uses the `Languages`database table seem and expects `DE`:

https://github.com/geonetwork/core-geonetwork/blob/eb691da1d17b341bb97cac1ee8ea893b1c3d1e21/schemas/iso19139/src/main/plugin/iso19139/layout/utility-tpl-multilingual.xsl#L67
instead of using the mapping defined in the `gmd:locale`:
https://github.com/geonetwork/core-geonetwork/blob/eb691da1d17b341bb97cac1ee8ea893b1c3d1e21/schemas/iso19139/src/main/plugin/iso19139/templates/vector-multilingual.xml#L110-L117
Probably other places rely on the `Languages`database table. What do you think @fxprunayre, should we update the template to use the codes from the database? Or can be usual that other codes are used as long as they are mapped in the `gmd:locale` elements?
Contributor guide
Research direction
Start with utility-tpl-multilingual.xsl around line 67 and compare its iso2-to-iso3 lookup with the gmd:locale mapping in vector-multilingual.xml around lines 110-117. Check the Languages database table and other references to determine which code source should be authoritative. Done means the iso19139 multilingual template renders language names or values instead of null for affected languages.
Written by the indexing model from the issue text.
Assessment
- Domain
- databases, localization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100