Open DanGastardelli opened 1 year ago
Hey @DanGastardelli I was able to reproduce the same behaviour where english would be loaded by default, but this was because my language cookie still contained the en
language. After clearing my cookies the pt-BR
was correctly loaded so everything works as it should (on DSpace 7.6). I was also not able to reproduce the error where not activated languages where shown in the language switch. Could you maybe check if this issue is still occurring on DSpace 7.6 for you?
Describe the bug The bug occurs in dspace 7.3 when I define which languages will be used in the environment and which will be the default language. Settings made in "src/config/default-app-config.ts" are ignored.
To Reproduce Steps to reproduce the behavior:
Open the file "src/config/default-app-config.ts";
Modifying language settings for:
// Default Language in which the UI will be rendered if the user's browser language is not an active language defaultLanguage = 'pt-BR';
// Languages. DSpace Angular holds a message catalog for each of the following languages. // When set to active, users will be able to switch to the use of this language in the user interface. languages: LangConfig[] = [ { code: 'en', label: 'English', active: true }, { code: 'cs', label: 'Čeština', active: false }, { code: 'de', label: 'Deutsch', active: false }, { code: 'es', label: 'Español', active: true }, { code: 'fr', label: 'Français', active: false }, { code: 'gd', label: 'Gàidhlig', active: false }, { code: 'lv', label: 'Latviešu', active: false }, { code: 'hu', label: 'Magyar', active: false }, { code: 'nl', label: 'Nederlands', active: false }, { code: 'pl', label: 'Polski', active: false }, { code: 'pt-PT', label: 'Português', active: false }, { code: 'pt-BR', label: 'Português do Brasil', active: true }, { code: 'fi', label: 'Suomi', active: false }, { code: 'sv', label: 'Svenska', active: false }, { code: 'tr', label: 'Türkçe', active: false }, { code: 'kk', label: 'Қазақ', active: false }, { code: 'bn', label: 'বাংলা', active: false }, { code: 'hi', label: 'हिंदी', active: false}, { code: 'el', label: 'Ελληνικά', active: false }, { code: 'uk', label: 'Yкраї́нська', active: false}
Saving file and recompiling project;
Copy from the dist folder to a more suitable folder;
Starting project with pm2 according to environment settings in "dspace-ui.json" file.
Expected behavior It was expected that dspace would start in Portuguese Brazil and with only three language options: "English", "Español", "Português do Brasil". However, it starts in English and shows all the language options for use.
Related work This bug resembles this case https://github.com/DSpace/dspace-angular/issues/1795.