You need to sign in to do that
Don't have an account?
Rathish
Getting picklist values in different language
Hi,
Translation workbench is enabled for our organization. And one of the picklist valus are converted to a native language Chinese.
Through code, I would like to get the picklist values in chinese.
Can you help me on this?
Regards,
Rathish
Hi Simon,
Thanks for the reply.
Through the applicatrion a default user has been used to get the values from SFDC and the language has been set as English for that user in SFDC.
But when a customer from China accessing our application should get the values in Chinese from SFDC. The chinese values for different picklists are stored in Translation workbench.
Is that possible to get these values for a chinese customer?
Regards,
Rathish.
Please find the way I did it.
public webrefSForce.PicklistEntry[] GetIndustryPicklist()//V1.2
{
try
{
webrefSForce.PicklistEntry[] objPick = null;//Declaring PicklistEntry object, which will hold all the regions
webrefSForce.DescribeSObjectResult objDescribeSObjectResult = cobjBinding.describeSObject("Lead");
foreach (webrefSForce.Field objField in objDescribeSObjectResult.fields)
{
if (objField.type == webrefSForce.fieldType.picklist && objField.name == "Industry") // Is this a picklist and is the field name Type—
{
objPick = objField.picklistValues;
}
}
return objPick;
}
catch (Exception ex)
{
throw ex;
}
}
There is one, although dirty way, to do it. You have to change the current user's language for purpose of desired code execution: