Localization issue

7 posts, 0 answers
  1. develuser
    develuser avatar
    14 posts
    Member since:
    Dec 2011

    Posted 25 Jun 2012 Link to this post

    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

  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 25 Jun 2012 Link to this post

    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 >>

  3. DevCraft banner
  4. develuser
    develuser avatar
    14 posts
    Member since:
    Dec 2011

    Posted 25 Jun 2012 Link to this post

    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
  5. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 25 Jun 2012 Link to this post

    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 >>

  6. develuser
    develuser avatar
    14 posts
    Member since:
    Dec 2011

    Posted 25 Jun 2012 Link to this post

    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
  7. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 26 Jun 2012 Link to this post

    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 >>

  8. develuser
    develuser avatar
    14 posts
    Member since:
    Dec 2011

    Posted 26 Jun 2012 Link to this post

    Hello Maya,

    Thank you very much.

    Greetings,
    Laurent
Back to Top
DevCraft banner