Question

I need the picker page from the toolkit's datepicker control to be in spanish. I tried a few approaches found here on SO, but they didn't work for me.

One thing a noticed is that when i run the sample app from the toolkit, the picker page is localized, but when i run my app which uses the same dll, it does not.

So the question is, what is doing the sample app, that mine doesn't in order for the picker page to be localized?

My DatePicker declaration:

<toolkit:DatePicker Width="280" Background="#96CA04" Foreground="White"  Value="    {Binding LeagueBegDate,Mode=TwoWay}"  />

Sample App DAtePicker declaration:

<toolkit:DatePicker ValueChanged="DatePicker_ValueChanged"/>
Was it helpful?

Solution

What i had to do was, to open the .csproj file of my project and add es-ES; entry under the <SupportedCultures> node.

I did try adding just es;, but it didn't work. It had to be es-ES; as in the toolkit project, under the LocalizedResources folder the resx files is called: ControlResources.es-ES.resx.

So the entry ended up looking like this:

<SupportedCultures>
    es; es-ES;
</SupportedCultures>

To clarify, i did not have to add a localized resources file in my project, just added the supported cultures and the toolkit's localization kicked in.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top