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

How to set the default language? #723

Closed
Nokecy opened this issue Jan 9, 2019 · 5 comments

Comments

@Nokecy
Copy link
Contributor

commented Jan 9, 2019

No description provided.

@maliming

This comment has been minimized.

Copy link
Contributor

commented Jan 10, 2019

My current practice:

var defaultLanguage = app.ApplicationServices.GetService<ISettingDefinitionManager>().Get(LocalizationSettingNames.DefaultLanguage);
app.ApplicationServices.GetService<DefaultValueSettingValueProvider>().SetAsync(defaultLanguage, "zh-Hans", null);
@Nokecy

This comment has been minimized.

Copy link
Contributor Author

commented Jan 11, 2019

@maliming 谢谢

@Nokecy Nokecy closed this Jan 11, 2019
@maliming

This comment has been minimized.

Copy link
Contributor

commented Feb 27, 2019

For the 0.14.0 version you can use a code similar to the following to modify.
app.ApplicationServices.GetService<ISettingDefinitionManager>(). Get(LocalizationSettingNames.DefaultLanguage).DefaultValue = "zh-Hans";

@wakuflair

This comment has been minimized.

Copy link
Contributor

commented Feb 28, 2019

Note: do not forget to clear browser cookie after setting the default language.

@yimogit

This comment has been minimized.

Copy link

commented Mar 23, 2019

Get master branch(0.15.0) samples/Acme. BookStore and set the default language to zh-Hans. I didn't find the right way.
Now should be how to set up?
I hope I can get help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.