RadzenDatePicker months language

Hi. I'm having an issue with the RadzenDatePicker component in my Blazor application (using both WebAssembly and Server). I need the month names to display in the UI language, regardless of the global culture settings. Essentially, I want to allow the user to choose from any of the implemented languages (e.g., "PL", "EN", "ES", etc.), and have the DatePicker display month names in the selected language.

I implement culture and language like this:

var localStorage = host.Services.GetRequiredService<ILocalStorageService>();

var cultureFromLS = await localStorage.GetItemAsync<string>("appCulture");
var languageFromLS = await localStorage.GetItemAsync<string>("appLanguage");

CultureInfo.DefaultThreadCurrentCulture = new CultureInfo(cultureFromLS);
CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo(languageFromLS);

In summary: the user is able to choose from several defined languages and cultures. The month names must depend on the language, while the date format depend on the culture. What I'm missing?

Any help or insights would be greatly appreciated!

Radzen DatePicker uses CultureInfo.CurrentCulture to get the month names. If it is not set to the desired value you can explicitly set the Culture property:

    <RadzenDatePicker @bind-Value=@value 
      Culture="@(new System.Globalization.CultureInfo("ja-JP"))" />

Thanks @korchev. Yes, I was also setting CultureInfo.CurrentCulture in my application, but the problem wasn't there. It turned out that I made a mistake in the date format implementation... Anyway, thank you for your answer and for pointing me to the "Culture" attribute.

Code that works for me:

renderFragment.AddAttribute(i++, "Culture", CultureInfo.CurrentUICulture);
renderFragment.AddAttribute(i++, "DateFormat", dateFormat);