Hi Mukhametali, If you simply want to limit the number of languages shown in the header, you can do that via configuration. There's no need to modify the code in the DSpace User Interface.
Simply change the configuration in your "config.prod.yml" to list *only the languages you wish to have enabled*. So, if you only want to enable three languages, then only list those 3 languages in your config.*.yml file. See the documentation at https://wiki.lyrasis.org/display/DSDOC7x/User+Interface+Configuration#UserInterfaceConfiguration-LanguageSettings I've verified that, if you change the configuration, then switching the language will keep you on the same page. That's the easiest way to fix this problem. Tim On Tuesday, August 22, 2023 at 1:18:54 AM UTC-5 [email protected] wrote: > Hello dear Dspace community! I can not solve one problem and I ask you for > help! > In repository https://repository.kaznu.kz/home. > I left only three languages. When changing to any of them, I change the > language, but the redirect goes to the home-page. What could be the problem? > Here is my source code: > *src/app/shared/lang-switch/lang-switch.component.html* > > <!-- <div ngbDropdown class="navbar-nav" *ngIf="moreThanOneLanguage" > display="dynamic" placement="bottom-right"> > <a href="javascript:void(0);" role="button" > [attr.aria-label]="'nav.language' |translate" > [title]="'nav.language' | translate" class="px-1" > (click)="$event.preventDefault()" data-toggle="dropdown" > ngbDropdownToggle > tabindex="0"> > <i class="fas fa-globe-asia fa-lg fa-fw"></i> > </a> > <ul ngbDropdownMenu class="dropdown-menu" > [attr.aria-label]="'nav.language' |translate"> > <li class="dropdown-item" tabindex="0" #langSelect *ngFor="let lang of > translate.getLangs()" > (keyup.enter)="useLang(lang)" > (click)="useLang(lang)" > [class.active]="lang === translate.currentLang"> > {{ langLabel(lang) }} > </li> > </ul> > </div> --> > > <div class="lang-block"> > <ul> > <li class="lang-block-item"> > <a href="" (click)="useLang('en')" class="lang-link">eng</a> > </li> > <li class="lang-block-item"> > <a href="" (click)="useLang('kk')" class="lang-link">каз</a> > </li> > <li class="lang-block-item"> > <a href="" (click)="useLang('ru')" class="lang-link">рус</a> > </li> > </ul> > </div> > > Please suggest specific steps how to solve this problem please! > Thank you very much. > Sincerely, Mukhametali. > -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/6eed6f52-ae2d-4561-a290-4011835cb4a0n%40googlegroups.com.
