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
Rounak SharmaRounak Sharma 

how can we query custom object translation?

Raj VakatiRaj Vakati
There is currently no supported Custom Labels / Translations API from Apex, the Web Services API, or SOQL 

You need to get the values of the translated values using the labels


Custom Labels can ONLY be referenced in apex code as in the following:

String labelValue = System.Label.my_label;

The value returned will be the label's translation for either the current user's language or if specified, the language for the visualforce page.  This is too inflexible in many situations.  This idea requests an API be developed to allow for explicit retrieval of a translation for a custom label.  Something like the following:

String labelValue = System.Label.my_label.getTranslation('zh_CN');

https://success.salesforce.com/ideaView?id=08730000000714W
Rounak SharmaRounak Sharma
But I want to retrieve. thanks in advance for the help.this is exactly what I want to retrieve.
Piyush Sinha 36Piyush Sinha 36
There is direct way of comparing custom labels values with translated values. Below is some workaround.

Tool - salesforce inspector (plugin) or any tooling API tool. Note: You can fetch custom labels and translation only through tooling API.
Rune below two queries; one on custom labels (API name either "customlabel" or "externalstring") and second on translated value (API name is "localizedvalue")

Query to get custom labels value - Run any one of these
  • select id, name,language,value from customlabel
  • select id, name,language,value from externalstring
Export it to excel sheet.

Query on translated values from all objects in org - Select parentid,parentvalue,language,value from LocalizedValue 
This query will return all translated value from your org, not only from custom labels. It will fetch all translated values.

Now apply vlookup on parentid of localizedvalue and search value in externalstring. By this you can compare you expected and actual value.