1

I have GeoNetwork 3.0.4 running and every time I go to the address, it redirects me to the Portuguese version

geonetwork/srv/por/catalog.search#/home

I'd like for all users to load only the site in the English language

geonetwork/srv/eng/catalog.search#/home

Where are those settings controlled? I tried changing the settings in config.xml but that did not work.

3

GeoNetwork automatically detects the default language from the browser and redirects to that language. You will have to override that to avoid this redirection.

Check the Spring MVC configuration here: https://github.com/geonetwork/core-geonetwork/blob/5f886f80c76b2c88c1f4c13a07aa1f017cdcdb0c/web/src/main/webapp/WEB-INF/spring-servlet.xml#L24

  • sorry for digging this out but I might be missing a crucial point here: My spring-servlet.xml says exactly that: <property name="defaultLocale" value="eng" /> But the browser always changes back to German. How can I make it permanently taking english. – AndyB Dec 27 '17 at 17:36
2

I was looking at CatController.js and the Spring MVC but couldnt do much.

I managed to set everything in english (one language only) by manipulating the HTTP headers passed from Nginx to geonetwork

https://stackoverflow.com/questions/11939171/mapping-accept-language-header-to-domain-with-nginx-and-django

 location /geonetwork {
            proxy_set_header X-Forwarded-Host $host;
            proxy_set_header X-Forwarded-Server $host;
            proxy_set_header Accept-Language 'en-US';
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_pass        http://127.0.0.1:8080;
    }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.