Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When removing English from the languages it still gets defaulted to in blazor-server. #21301

Open
1 task done
Hyppothalamus opened this issue Nov 8, 2024 · 5 comments
Open
1 task done

Comments

@Hyppothalamus
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Description

I was setting up a tiered Blazor-server project where I also was implementing the AuthServer in HttpApiHost.
While I was removing the languages in the DomainModule and only enabling Dutch. I restarted the application (Blazor and Host) to check my changes to my suprise English was still selected by default.

When changing to the only other language (Dutch) the select dropdown goes away and the correct language gets selected.

I was searching on the internet but could not find any solutions. Like setting the default language in the OnApplicationInitialization doesn't work.

Any help would be really recommended and thanks in advance!

Reproduction Steps

New blazor server tiered project with basic theme. Remove all the languages except dutch and start the application.

Default english will be selected with the option to change to dutch. After changing you cannot go back to english because it shouldn't be enabled.

Expected behavior

Their is no language select dropdown and dutch will be selected and defaulted to.

Actual behavior

Their is a language dropdown with 1 option dutch and english is selected by default.

Regression?

No response

Known Workarounds

None

Version

8.3.3

User Interface

Blazor Server

Database Provider

EF Core (Default)

Tiered or separate authentication server

Tiered

Operation System

Linux

Other information

No response

@nebula2
Copy link
Contributor

nebula2 commented Nov 9, 2024

language is also stored as a cookie. may it be that you did not clear it?

@maliming
Copy link
Member

hi @Hyppothalamus

Can you share a test project to reproduce?

@Hyppothalamus
Copy link
Author

localization_test.zip

This is a test project I created. All the languages are disabled except for nl-BE in the DomainModule and in the SharedDomainModule default culture name is changed to nl-BE. This is a blazor-server tiered project with the latest abp framework.

I also cleared my cookies after changing the languages.

Thanks in advance!

@maliming
Copy link
Member

hi

image

image
image
image

@maliming maliming removed the bug label Nov 18, 2024
@Hyppothalamus
Copy link
Author

Thank you for the fix. This sounds like a default feature is there a reason why this isn't in the docs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants