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

Forums / Ecommerce / Why I cannot put a Vietnamese name in unicode for label of Product fields

Why I cannot put a Vietnamese name in unicode for label of Product fields

5 posts, 0 answered
  1. Thanh
    Thanh avatar
    13 posts
    Registered:
    21 Nov 2011
    30 Sep 2014
    Link to this post

    Hi guys,

    I cannot put a Vietnamese name in unicode for label of Product fields, in backend, when I add a field I cannot choose DBType to NVARCHAR, just VARCHAR so I cannot store label name of this field in Vietnamese, in front end site, it is display incorrectly. Exp: you can try with this words "Tiếng Việt".

    Please, fix error.

  2. Ivan D. Dimitrov
    Ivan D. Dimitrov avatar
    310 posts
    Registered:
    26 Mar 2015
    03 Oct 2014
    Link to this post
    Hi Thanh,

    I tested the scenario you describe and the string in question was persisted as a VarChar. If you require specific NVarChar entries, you can change the database type of your field via code. The following is an example:
    var metaManager = MetadataManager.GetManager();
    var theField =  metaManager.GetMetafields().Where(f => f.Title == "YourProductTypeField").FirstOrDefault();
    theField.DBType = "NVARCHAR";
    metaManager.SaveChanges();

    The code uses the MetadataManager to get the MetaField for your product type and alters its DBType property, thus altering the type of the database persisted value.

    Regards,
    Ivan D. Dimitrov
    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
     
  3. Thanh
    Thanh avatar
    13 posts
    Registered:
    21 Nov 2011
    05 Oct 2014 in reply to Ivan D. Dimitrov
    Link to this post
    Thanks, it's helpful.
  4. Thanh
    Thanh avatar
    13 posts
    Registered:
    21 Nov 2011
    06 Oct 2014
    Link to this post

    Hi Ivan,

    Can we have a way to solve it without coding, because I just want to add its from backend module, I cannot code for every single field, the simplest way is change  DBTYPE of [sf_meta_fields.title_] to NVARCHAR, can I do it at the application starts?

  5. Ivan D. Dimitrov
    Ivan D. Dimitrov avatar
    310 posts
    Registered:
    26 Mar 2015
    08 Oct 2014
    Link to this post
    Hello Thanh,

    If you do not want to use any code, there is a setting available for this functionality. Go to Administration->Settings->Advanced->Metadata->Database Mappings. Locate the control which you want to map in a different manner and change its DataType and SQL specific type accordingly. You will need to restart the application in order for the changes to apply.

    Regards,
    Ivan D. Dimitrov
    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
     
5 posts, 0 answered