core-geonetwork
core-geonetwork copied to clipboard
iso19139 multilingual template shows "null" for certain languages
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?
According to the specs, I believe we need to use the values from gmd:locale
If we need something from the database then I believe we have to gogmd:locale
-> <gmd:LanguageCode codeList="" codeListValue="ger"/>
and then use ger
to get data from database.