localization issues

1 Answer 100 Views
Localization
d
Top achievements
Rank 1
d asked on 02 Apr 2022, 05:53 AM

When I configure like this

var supportedCultures = new[] { new CultureInfo("zh-CN") };//new CultureInfo("en-US"), new CultureInfo("zh-CN")

app.UseRequestLocalization(new RequestLocalizationOptions
{
    DefaultRequestCulture = new RequestCulture("zh-CN"),
    SupportedCultures = supportedCultures,
    SupportedUICultures = supportedCultures
});

and

	<link href="https://cdn.kendostatic.com/2022.1.301/styles/kendo.bootstrap-main.min.css" rel="stylesheet" type="text/css" />
	<script src="https://cdn.kendostatic.com/2022.1.301/js/jquery.min.js"></script>
	<script src="https://cdn.kendostatic.com/2022.1.301/js/jszip.min.js"></script>
	<script src="https://cdn.kendostatic.com/2022.1.301/js/kendo.all.min.js"></script>
	<script src="https://cdn.kendostatic.com/2022.1.301/js/kendo.aspnetmvc.min.js"></script>

    <script src="https://kendo.cdn.telerik.com/2022.1.301/js/cultures/kendo.culture.zh-CN.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2022.1.301/js/messages/kendo.messages.zh-CN.min.js"></script>
    <script>
        kendo.culture("zh-CN");
    </script>
</head>

The page effect is not displayed properly

I found that the second screen start of the scroll bar is not localized

But when I set it up like this


var supportedCultures = new[] { new CultureInfo("en-US") };//new CultureInfo("en-US"), new CultureInfo("zh-CN")

app.UseRequestLocalization(new RequestLocalizationOptions
{
    DefaultRequestCulture = new RequestCulture("en-US"),
    SupportedCultures = supportedCultures,
    SupportedUICultures = supportedCultures
});
_Layout.cshtml configuration remains unchanged

it shows correct

There is a problem with the product configuration documentation(https://docs.telerik.com/aspnet-core/globalization/localization)
Why is this? How can I remodel?
I use the default aspnet.core MVC project (V2022 R1 SP1)
grateful

1 Answer, 1 is accepted

Sort by
0
Accepted
Stoyan
Telerik team
answered on 06 Apr 2022, 10:44 AM

Hello D Jd,

The disparity you have observed occurs because the client-side culture has all of its messages translated but the server-side resource does not. To fix this I would recommend you to add the needed translations to the Messages.zh-CN.resx file as shown in the Customizing the Localized Messages section of our Localization article.

In addition, if you'd like, you can send the modified file to me and I will update the current resource with the translations. In such a case you will be eligible for Telerik points award as a token of appreciation for your contribution.

I remain open should further questions arise.

Regards,
Stoyan
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

d
Top achievements
Rank 1
commented on 07 Apr 2022, 01:32 AM | edited

thank you for your reply.

I am using the trial version.

I don't have the source code, really sorry, but thanks anyway

Stoyan
Telerik team
commented on 11 Apr 2022, 07:23 AM

Hi D Jd, 

Hopefully the information above will be helpful should you decide to upgrade to our Licensed version.

We remain open should further questions occur.
Tags
Localization
Asked by
d
Top achievements
Rank 1
Answers by
Stoyan
Telerik team
Share this question
or