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

Localization issue

6 Answers 94 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
develuser
Top achievements
Rank 1
develuser asked on 25 Jun 2012, 11:38 AM
Hello Telerik,

I try to localize the RadDataForm in french, but it seems to not work.

To do that, I initialize the language property of my UserControl with the current language : 

public partial class DataFormView : UserControl {
    private DummyViewModel ViewModel;
 
    public DataFormView( DummyViewModel vm ) {
        Language = XmlLanguage.GetLanguage( Thread.CurrentThread.CurrentCulture.Name );
         
        InitializeComponent();
 
        ViewModel = vm;
        DataContext = ViewModel;
    }
}

If I do the same with a GridView, it works fine.

public partial class GridView : UserControl {
    private DummyViewModel ViewModel;
 
    public GridView( DummyViewModel vm ) {
        // Even if no language is set, the date format is ok in the grid
        Language = XmlLanguage.GetLanguage( Thread.CurrentThread.CurrentCulture.Name );           
 
        InitializeComponent();
 
        ViewModel = vm;
        DataContext = ViewModel;
    }
}

I use Telerik Silverlight Control v2012.2.620.1050

You can see the result in the picture below (the date format and the text are correct in the GridView but not in the DataForm).

I will open a ticket to send you my test project.

Greetings,
Laurent

6 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 25 Jun 2012, 12:06 PM
Hi Laurent,

You do everything correct. The thing is that RadDataForm is not localized in French. What you can do is to localize it manully on your own as illustrated in our documentation. The resource keys that you need are as follows:
   â€¢ DataForm_AddNew = Add
   â€¢ DataForm_BeginEdit = Edit
   â€¢ DataForm_Delete = Delete
   â€¢ DataForm_MoveCurrentToFirst = First
   â€¢ DataForm_MoveCurrentToLast = Last
   â€¢ DataForm_MoveCurrentToNext = Next
   â€¢ DataForm_MoveCurrentToPrevious = Previous

Let me know in case you need any assistance.


Greetings,
Maya
the Telerik team

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

0
develuser
Top achievements
Rank 1
answered on 25 Jun 2012, 12:14 PM
Hello Maya,

Thank you for your quick reply.

Ok, I understand how I can do for the localization of all text, but what about the date format ?
See the date field on each forms.

Greetings,
Laurent
0
Maya
Telerik team
answered on 25 Jun 2012, 12:31 PM
Hello Laurent,

Do you want to display date in different format - dd-mm-yyyy for example ? If so, can you try setting CurrentUICulture and CurrentCulture properties of the CurrentThread (as illustrated in the documentation) ?  

Kind regards,
Maya
the Telerik team

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

0
develuser
Top achievements
Rank 1
answered on 25 Jun 2012, 12:37 PM
Hello Maya,

I want to dispay the date with the format define in the CurrentCulture. It works fine in the GridView, but not in the DataForm. Please, see the project I sent you with the Ticket for the complete exemple.

Greetings,
Laurent
0
Maya
Telerik team
answered on 26 Jun 2012, 01:55 PM
Hi Laurent,

It turns out it is a bug in RadDataForm that has been resolved immeditely. The fix will be available in our next internal build.
Furthermore, we will try to provide native French localization for RadDataForm so that you do not need to create resources manually, but rather have them out-of-the-box.


Kind regards,
Maya
the Telerik team

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

0
develuser
Top achievements
Rank 1
answered on 26 Jun 2012, 02:02 PM
Hello Maya,

Thank you very much.

Greetings,
Laurent
Tags
DataForm
Asked by
develuser
Top achievements
Rank 1
Answers by
Maya
Telerik team
develuser
Top achievements
Rank 1
Share this question
or