Grid Edit Header and buttons have unwanted localization

1 Answer 75 Views
Grid Localization
Mattias
Top achievements
Rank 1
Iron
Mattias asked on 08 Jul 2021, 06:37 AM

I use Grids with both popup and inline editing.  My application is in English and I have not configured any localization at all.  I have the problem of unwanted localization when editing, buttons (inline and popup) and Window header (popup, see image) are getting localized. In my case with Swedish translations. It seems to be the same as the server Windows setting. If I use a client with English OS and settings, the popup is still in server localization. If I install on a English OS, the buttons and headers are in English.

This always shows "en-US" as result, whatever combination of Swedish/english server/client browser I use.

var culture = kendo.culture();
console.log(culture.name); 

How do I turn off this "default" OS unwanted localization and make everything in English regardless of OS language?

 

 

1 Answer, 1 is accepted

Sort by
0
Mattias
Top achievements
Rank 1
Iron
answered on 10 Jul 2021, 09:31 AM

I finally solved the problem. Adding the following in the Startup.cs, seems to do the trick.


public void ConfigureServices(IServiceCollection services)
        {
           
            System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");

 

Now all the headers and buttons are in English as the rest of the application regardless of Windows install language.

Tags
Grid Localization
Asked by
Mattias
Top achievements
Rank 1
Iron
Answers by
Mattias
Top achievements
Rank 1
Iron
Share this question
or