Data Form Localization

8 posts, 0 answers
  1. Chris
    Chris avatar
    22 posts
    Member since:
    Feb 2015

    Posted 24 Mar Link to this post

    Hi,

    In XAML I would do something like this:

    <EntryCell  x:Name="passenger" Label="{i18n:Translate Passenger_Label}" Placeholder="{i18n:Translate Passenger_Entry_Placeholder}" Text="{Binding PassengerName}"></EntryCell>

     

    But I am not exactly sure how to register editors in XAML for the Telerik controls everything seems to point towards decorating the viewmodel and handling everything in the code behind. If that is the case should I use the Display attribute from System.ComponentModel.DataAnnotations to address this issue? Something like:

    [Display(ResourceType = typeof(CurrentLocale), Name = "Passenger_Label"))]

    public string PassengerName{ get; set; }

     

    Also, using this approach how would I address the placeholder?

    Thanks,

    Chris

  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1236 posts

    Posted 30 Mar Link to this post

    Hello Chris,

    You are right that the editors of the RadDataForm cannot be configured in XAML. Users should register the property - editor pair in code. In addition to this users should decorate their ViewModel in a way that fits their scenario. Please take your time to have a look at our online documentation. We have described how the control should be configured and which attributes can be used. Also, there are some simple examples that will get you started.

    If you encounter anything that you think can be explained better or we have missed to explain we would really appreciate your feedback.

    Regards,
    Pavel R. Pavlov
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Marc
    Marc avatar
    7 posts
    Member since:
    Jan 2008

    Posted 20 Apr Link to this post

    The response dont clears the question, at least to me.

    How you are able to Localize the following DataAnnotation:

        [DisplayOptions(Header = "Your header text goes here", Group = "Some group name")] ??

    The DataAnnotation does not have a Property to set ResourceType.

    Solution?

     

    best regards

    Marc

  4. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1236 posts

    Posted 25 Apr Link to this post

    Hi Marc,

    The DisplayOptions annotation allows you to set whatever string you need. If you need to localize the control you just need to set the correct string accordingly.

    You may find interesting this article.

    Regards,
    Pavel R. Pavlov
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  5. Marc
    Marc avatar
    7 posts
    Member since:
    Jan 2008

    Posted 25 Apr in reply to Pavel R. Pavlov Link to this post

    Sorry I dont understand, as we are not able to set a DataAnnotation with a Resources.Manager String?
    Our app is Localized with the Xamarin.Forms example you addressed, but a Resx value isnt a Constant variable
    and thats why we are not able to put it on a DataAnnotation String, as it requires a Constant string.

    Can you give me an example on how you would localize your Data Model with a localized DataAnnotation?

    Best regards

    Marc

  6. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1236 posts

    Posted 28 Apr Link to this post

    Hello Marc,

    Thank you for further clarifying your case. I can see your point now.
    At the time of writing there is no convenient localizing mechanism that can be used in the RadDataForm. We have intentions to provide one and this is why we exposed the following item. If you follow it you will be notified whenever we change its status.

    Regards,
    Pavel R. Pavlov
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  7. Marc
    Marc avatar
    7 posts
    Member since:
    Jan 2008

    Posted 28 Apr in reply to Pavel R. Pavlov Link to this post

    As I can see the Requested Feature is 1 year old. Is there a estimation when it will be available?

    Because as now, this DataForm feature is totally useless if you are working with a Multi-Language App.
    As today I suppose the most Apps are Multi language or at least should be.

    Best regards

    Marc

  8. Lance | Tech Support Engineer, Sr.
    Admin
    Lance | Tech Support Engineer, Sr. avatar
    419 posts

    Posted 28 Apr Link to this post

    Hi Marc,

    We cannot promise a timeframe for when the feature will be released. If you follow the Feedback Portal item, you'll be notified of status changes.

    You'll see the status change from "Approved" to "In Development" when the dev team starts on it. When it's finished and released, it will finally change to "Completed".

    Regards,
    Lance | Tech Support Engineer, Sr.
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top