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
410 stars 487 forks source link

Add preferred language to the UI settings. #5516

Open matself opened 3 years ago

matself commented 3 years ago

Is your feature request related to a problem? Please describe. Presently, it seems as if the only way to start GN in a pre-selected language is to add the language code in the URL. A short URL, like http://geonet.se:8080/geonetwork-3.11 will always open GN in English Only by adding a language code to an extended URL, like http://geonet.se:8080/geonetwork-3.11/srv/fre/catalog.search#/home it is possible to pre-select a language. Please forgive me if this setting actually exists. I have not been able to find it.

Describe the solution you'd like I think it would be good to be able to define the preferred language in the UI settings.

Describe alternatives you've considered

None of these suggestions would break the present setup, I think. Which is important. No selection or input in case one and two would render /eng/ in the URL as now, and the last proposal would render the /xxx/ for the top language.

fxprunayre commented 3 years ago

See https://github.com/geonetwork/core-geonetwork/blob/master/web/src/main/webResources/WEB-INF/config.properties#L1-L2 to configure the redirection made when accessing "http://localhost:8080/geonetwork" it should work fine to force usage of a specific language.

matself commented 3 years ago

Thanks @fxprunayre, there seems to be a lot of interesting stuff there. Is the required syntax documented anywhere? I will investigate.

fxprunayre commented 3 years ago

What do you mean by syntax ? Your file should contain values like eng. It is configurable at build time from https://github.com/geonetwork/core-geonetwork/blob/master/pom.xml#L1479-L1485 but if you are not running from source, you can change the value in config.properties and restart.

matself commented 3 years ago

By syntax I mean the available words or variables available for this config file. What are, for example the es.* variables? Second, what decides which config settings goes into the admin ui, and which ones need to be edited in text files? Btw, I happily found in that file the OSM map link that I have been searching for some time.