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

Posted by Community Admin on 05-Aug-2018 12:25

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

All Replies

Posted by Community Admin on 30-Sep-2014 00:00

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.

Posted by Community Admin on 03-Oct-2014 00:00

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
 

Posted by Community Admin on 05-Oct-2014 00:00

Thanks, it's helpful.

Posted by Community Admin on 06-Oct-2014 00:00

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?

Posted by Community Admin on 08-Oct-2014 00:00

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
 

This thread is closed