+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Localized label for textbox title in a form

Localized label for textbox title in a form

4 posts, 1 answered
  1. Julien
    Julien avatar
    2 posts
    Registered:
    10 Mar 2016
    15 Jun
    Link to this post

    Hello,

    Is it possible to create localized label in multiple langages and use it as title for a textbox field in  a form ?

    Thanks for your help

  2. Victor Leontyev
    Victor Leontyev avatar
    65 posts
    Registered:
    01 Jul 2014
    15 Jun
    Link to this post

    If i correct understood you question, sitefinity supports it out of the box.

    You can create form, translate it to another language and rename labels. 

    I attached example with  EN ans ES form translation

  3. Julien
    Julien avatar
    2 posts
    Registered:
    10 Mar 2016
    15 Jun
    Link to this post
    Thank you for your answer. Yes it is a solution but is there another way to do that with resource file ? Without creating mulitple forms in each langages ?
  4. Dimitri Cools
    Dimitri Cools avatar
    80 posts
    Registered:
    07 Dec 2016
    15 Jun
    Link to this post
    Hi, 
    Out of the box this is not possible.

    You could however create a custom form field where you have total control over and implement something like for example:;

    ...
        public class CustomField : FieldControl, IFormFieldControl
        {
            #region Constructor
            /// <summary>
            /// Initializes a new instance of the CustomField class.
            /// </summary>
            public CustomField()
            {
                var resources = ResourceManager.GetManager();
                this.Title = resources.GetResourceOrEmpty(Thread.CurrentThread.CurrentCulture, "FormResources", "myCustomFormField").Value;
            }
    ...
                

    Screenshot: http://screencast.com/t/jMBdOMQK07x


    Some additional information links;
    http://www.sitefinity.com/developer-network/videos/creating-custom-form-field-controls-with-sitefinity-thunder

    https://github.com/Sitefinity/feather/wiki/How-to-create-custom-forms-field



    Regards,
    Dimitri Cools
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
    Answered
4 posts, 1 answered