This is a migrated thread and some comments may be shown as answers.

Dialogs localization

1 Answer 47 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Igor
Top achievements
Rank 1
Igor asked on 23 Mar 2012, 07:42 PM
Hi, I need to localize your great controls and I have problems doing it for dialog buttons (Ok, Canlce in TimePicker). I followed the http://www.telerik.com/help/windows-phone/localization-how-to.html tutorial but I do not know what Keys to use for these buttons. Can anyone help?

1 Answer, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 28 Mar 2012, 02:19 PM
Hi Igor,

Thank you for the question.
Finding the keys is very easy, as described in the help article. You just have to open visual studio, create a sample project and add references to the assemblies that you need to localize. If you need to localize Telerik.Windows.Controls.Input and Telerik.Windows.Controls.Primitives, you simply have to add references to them. Once this is done, in order to find the keys for the Input assembly, you can write InputLocalizationManager inside a method. Visual studio should recognize the type and you can navigate to its dissassembly by pressing F12. Then you will see this disassembled code:

using System;
 
namespace Telerik.Windows.Controls
{
    // Summary:
    //     A singleton class that represents a localization manager responsible for
    //     localizing resources in the Telerik.Windows.Controls.Input assembly.
    public sealed class InputLocalizationManager : LocalizationManager
    {
        // Summary:
        //     Defines the key for looking-up the text for the cancel button in the date
        //     and time picker's application bar.
        public const string CancelButtonTextKey = "CancelButtonText";
        //
        // Summary:
        //     Defines the key for looking-up the "SELECT DATE" string.
        public const string DatePickerPopupHeaderKey = "DatePickerPopupHeader";
        //
        // Summary:
        //     Defines the key for looking-up the "Select date" string.
        public const string EmptyDateContentKey = "EmptyDateContent";
        //
        // Summary:
        //     Defines the key for looking-up the "Select time" string.
        public const string EmptyTimeContentKey = "EmptyTimeContent";
        //
        // Summary:
        //     Defines the key for looking-up the "Leap Year" string.
        public const string LeapYearKey = "LeapYear";
        //
        // Summary:
        //     Defines the key for looking-up the text for the ok button in the date and
        //     time picker's application bar.
        public const string OkButtonTextKey = "OkButtonText";
        //
        // Summary:
        //     Defines the key for looking-up the "SELECT TIME" string.
        public const string TimePickerPopupHeaderKey = "TimePickerPopupHeader";
 
        // Summary:
        //     Gets the text for the cancel button in the date and time picker's application
        //     bar.
        public string CancelButtonText { get; }
        //
        // Summary:
        //     Gets a string that is displayed in the Telerik.Windows.Controls.RadDatePicker
        //     when there is no date selected in the control.
        public string EmptyDateContentString { get; }
        //
        // Summary:
        //     Gets a string that is displayed in the Telerik.Windows.Controls.RadTimePicker
        //     when there is no time selected in the control.
        public string EmptyTimeContentString { get; }
        //
        // Summary:
        //     Gets the only instance of the Telerik.Windows.Controls.InputLocalizationManager
        //     class.
        public static InputLocalizationManager Instance { get; }
        //
        // Summary:
        //     Gets the text for the ok button in the date and time picker's application
        //     bar.
        public string OkButtonText { get; }
    }
}

The constants at the top of the file are the keys you are looking for.

For the Primitives assembly you need to do something different. Since the localization keys in Primitives are defined as readonly, not const, you have to open the assembly with Reflector. Navigate to the PrimitivesLocalizationManager class and inspect the strings there.

Please write again if you need further assistance.

Kind regards,
Victor
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
General Discussions
Asked by
Igor
Top achievements
Rank 1
Answers by
Victor
Telerik team
Share this question
or