This is a migrated thread and some comments may be shown as answers.
DatePicker culture translation still showing option in English
7 Answers 102 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
B1SHQP
Top achievements
Rank 2
B1SHQP asked on 01 May 2012, 02:29 AM
WP7 DatePicker culture translation still showing options in English.

When the phone language is set to French, the DatePicker  still shows the title 'SELECT DATE' in English, as well as 'Leap Year' on the year list and 'done' and 'cancel' on the buttons.

How are these translated from English to French?

7 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 01 May 2012, 12:53 PM
Hi Andrew,

Thanks for writing and for your question.

Normally, to have your Windows Phone App localized, you will need to add the SupportedCultures tag in your Windows Phone app project by unloading it and editing the XML. 

You can find some useful information about doing this here:

http://forums.create.msdn.com/forums/t/89297.aspx 

I hope this helps.

Kind regards,
Deyan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
B1SHQP
Top achievements
Rank 2
answered on 01 May 2012, 09:13 PM
I have added 'fr' to my .csproj file and added a french RESX files etc etc., my parts of  my app are in French.

Your date picker shows the days and month name in french,

but the main title 'SELECT DATE', the 'done' and 'cancel' buttons are not translated.

Also as this is a leap year I noticed that 'Leap Year' on the 2012 also stays in English.

So how are these translated into the chosen language. 
0
Deyan
Telerik team
answered on 04 May 2012, 07:49 AM
Hello Andrew,

Could you please confirm that the global CultureInfo in your app is set to fr-FR?

I have tested RadDatePicker on my side in an application where the UI culture of the current thread is set to be fr-FR and it works as expected:

Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr-FR");

I look forward to your response.

All the best,
Deyan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Andras
Top achievements
Rank 1
answered on 29 Aug 2012, 12:26 PM
The solution partly works. I want to localize my application to hu-HU. The day and month names are in HU with the culture settings however "leap year" "done" and "cancel" is not. Is there a way localize all strings?
0
Deyan
Telerik team
answered on 30 Aug 2012, 10:13 AM
Hi Andrew,

Thanks for writing.

Some of the DateTime names that come from the .NET framework classes are automatically localized. For strings that are part of our controls we have provided localization for German, French and Spanish. You will have to write your own localization provider if you wish to lozalice for other languages.

We have a couple of useful articles on our website that will guide you through this process.

Take a look at them here:

http://www.telerik.com/help/windows-phone/localization-overview.html

All the best,
Deyan
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Eugeniy
Top achievements
Rank 2
answered on 24 Sep 2012, 06:27 AM
Hi.
So where could i find documentation about localizing keys. What is the name for "done" and "cancel" buttons?
0
Deyan
Telerik team
answered on 25 Sep 2012, 09:52 AM
Hi Eugeniy,

Each one of our assemblies has a localization manager which name is built from the name of the assembly ending with LocalizationManager:

- PrimitivesLocalizationManager
- InputLocalizationManager etc.

Since the RadDatePicker and RadTimePicker controls reside in the Input assembly, you will need to use the InputLocalizationManager:

InputLocalizationManager.Instance.StringLoader = new MyStringLoader();
 
public class MyStringLoader : IStringResourceLoader
{
    public string GetString(string key)
    {
        if (key == InputLocalizationManager.OkButtonTextKey)
        {
            return "OK";
        }
 
        if (key == InputLocalizationManager.CancelButtonTextKey)
        {
            return "CANCEL";
        }
        return null;
    }
}

Each localization manager exposes string constans which represent the keys of the resources that are localized. They have readable names for your convenience.

I hope this helps.

Regards,
Deyan
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

Tags
DatePicker and DateSelector
Asked by
B1SHQP
Top achievements
Rank 2
Answers by
Deyan
Telerik team
B1SHQP
Top achievements
Rank 2
Andras
Top achievements
Rank 1
Eugeniy
Top achievements
Rank 2
Share this question
or