function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
NowshadNowshad 

Need immediate help to translate the picklist value-Localization with SOQL

Dear All,

 

 Need immediate help as I am facing one major show stopper, it would be really a great help if you can respond.

 

We have a pick list in custom object with 25 language  translated values in translation work bench.  So the requirement here is , I need to build the SOQL to get the translated values from the picklist for 25 language. I searched in google, by using the tolabel() I can query to get the translated value based on the user default language i will get the translated value.

 

However, we have a popup with 25 languages. So when the user selects any one of the 25  language from the dropdown list, I need to build the SOQL to get the translated value of the picklist from the translation workbench.

 

In below SOQL Metrics_Type__c is pick list and Language code (from below list i am passing the language code)which I am passing from the drop downlist from the popup. Kindly help to get the translated values.

------------- SOQL QUERY (Pseudo)  -START---------------

select id, Previous_FY_Actual_Q1_Days__c, Previous_FY_Actual_Q2_Days__c, Previous_FY_Actual_Q3_Days__c, Previous_FY_Actual_Q4_Days__c, Previous_FY_Actual_Total_Days__c, &lf;Current_FY_Planned_Q1_Days__c, Current_FY_Planned_Q2_Days__c, Current_FY_Planned_Q3_Days__c, Current_FY_Planned_Q4_Days__c, Current_FY_Planned_Total_Days__c, &lf;Current_FY_Actual_Q1_Days__c, Current_FY_Actual_Q2_Days__c, Current_FY_Actual_Q3_Days__c, Current_FY_Actual_Q4_Days__c, Current_FY_Actual_Total_Days__c,  (select Metrics_Type__c form translationworkbench where LanguageCode=’de’) , Current_FY_Achievement_Q1__c,Current_FY_Achievement_Q2__c,Current_FY_Achievement_Q3__c,Current_FY_Achievement_Q4__c,Current_FY_Achievement_Total__c,Current_FY_Actual_Q1_percent__c,Current_FY_Actual_Q2_percent__c,Current_FY_Actual_Q3_percent__c,Current_FY_Actual_Q4_percent__c,Current_FY_Actual_Total_percent__c,Current_FY_Planned_Q1_percent__c,Current_FY_Planned_Q2_percent__c,Current_FY_Planned_Q3_percent__c,Current_FY_Planned_Q4_percent__c,Current_FY_Planned_Total_percent__c,Previous_FY_Actual_Q1_percent__c,Previous_FY_Actual_Q2_percent__c,Previous_FY_Actual_Q3_percent__c,Previous_FY_Actual_Q4_percent__c,Previous_FY_Actual_Total_percent__c,Current_FY_Actual_Q1__c,Current_FY_Actual_Q2__c,Current_FY_Actual_Q3__c,Current_FY_Actual_Q4__c,Current_FY_Actual_Total__c,Current_FY_Planned_Q1__c,Current_FY_Planned_Q2__c,Current_FY_Planned_Q3__c,Current_FY_Planned_Q4__c,Current_FY_Planned_Total__c,Previous_FY_Actual_Q1__c,Previous_FY_Actual_Q2__c,Previous_FY_Actual_Q3__c,Previous_FY_Actual_Q4__c,Previous_FY_Actual_Total__c,YoY_gr_Comparision_Plan_Q1__c,YoY_gr_Comparision_Plan_Q2__c,YoY_gr_Comparision_Plan_Q3__c,YoY_gr_Comparision_Plan_Q4__c,YoY_gr_Comparision_Plan_Total__c,YoY_Actual_Growth_Q1__c,YoY_Actual_Growth_Q2__c,YoY_Actual_Growth_Q3__c,YoY_Actual_Growth_Q4__c,Total_YoY_Actual_Growth__c,Allocated_MDF_Amount_Q1__c,Allocated_MDF_Amount_Q2__c,Allocated_MDF_Amount_Q3__c,Allocated_MDF_Amount_Q4__c,Total_Allocated_MDFAmount__c,Previous_Year_MDF_Spent_Q1__c,Previous_Year_MDF_Spent_Q2__c,Previous_Year_MDF_Spent_Q3__c,Previous_Year_MDF_Spent_Q4__c,Previous_Year_MDF_Spent_Total__c,Total_MDF_Spent_Amount__c,Total_MDF_Utilization_Rate__c,MDF_Spent_Amount_Q1__c,MDF_Spent_Amount_Q2__c,MDF_Spent_Amount_Q3__c,MDF_Spent_Amount_Q4__c,MDF_Utilization_Rate_Q1__c,MDF_Utilization_Rate_Q2__c,MDF_Utilization_Rate_Q3__c,MDF_Utilization_Rate_Q4__c,GbuSpecializationPlan__r.Name,GbuSpecializationPlan__r.GBU_Specialization__c

FROM Metrics__c

WHERE GbuSpecializationPlan__c in (select id from GBU_Specialization_Plans__c where Joint_Business_Plan__c='xyz’)

order by GbuSpecializationPlan__r.Name asc,  Metrics__c.CreatedDate  asc ')

------------- SOQL QUERY To Be Used in Tibco -END---------------

 

English

en

Chinese (Simplified)

zh_CN

Japanese

ja

Korean

ko

Portuguese (Brazilian)

pt-BR

Russian

ru

Spanish (Latin America/Mexico)

es-MX

Bulgarian

bg

Chinese (Traditional)

zh_TW

Czech

cs

Danish

da

Dutch

nl

Finnish

fi

French

fr

German

de

Greek

el

Hungarian

hu

Italian

it

Norwegian (Bokmal)

no

Polish

pl

Romanian

ro

Spanish International

es

Swedish

sv

Thai

th

Turkish

tr

Vietnamese

vi