geonetwork / core-geonetwork

GeoNetwork is a catalog application to manage spatially referenced resources. It provides powerful metadata editing and search functions as well as an interactive web map viewer. It is currently used in numerous Spatial Data Infrastructure initiatives across the world.
http://geonetwork-opensource.org/
GNU General Public License v2.0
420 stars 489 forks source link

iso19139 multilingual template shows "null" for certain languages #4786

Open josegar74 opened 4 years ago

josegar74 commented 4 years ago

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 Languagesdatabase table seem and expects DE:

multilingual-md

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 Languagesdatabase 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?

ianwallen commented 4 years ago

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.