When the default runtime.properties settings are used to configure a monolingual VIVO, HTTP requests with accept-language set to a language not supported by VIVO will result in an interface where all i18n strings are replaced with an error message.
It looks like SelectedLocale.getOverridingLocale() only gets a default if the languages.selectableLocales property in runtime.properties is populated and has produced a nonempty list of selectable locales. Otherwise (monolingual default VIVO) getOverridingLocale() returns null, which in turn causes the request not to get wrapped in a LocaleSelectionRequestWrapper, so req.getLocale() just returns whatever is in the actual request.
Brian Lowe (Migrated from VIVO-1959) said:
When the default runtime.properties settings are used to configure a monolingual VIVO, HTTP requests with accept-language set to a language not supported by VIVO will result in an interface where all i18n strings are replaced with an error message.
It looks like SelectedLocale.getOverridingLocale() only gets a default if the languages.selectableLocales property in runtime.properties is populated and has produced a nonempty list of selectable locales. Otherwise (monolingual default VIVO) getOverridingLocale() returns null, which in turn causes the request not to get wrapped in a LocaleSelectionRequestWrapper, so req.getLocale() just returns whatever is in the actual request.