---
schema_version: "1"
id: 05af1c6093eaf08ac821696c8c1bdbf8f84c3def117a9e72cc790b34ffdc36c9
title: toLabel()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/salesforce-soql-sosl/guides/soql-sosl/sforce-api-calls-soql-select-tolabel.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-soql-sosl/guide/sforce-api-calls-soql-select-tolabel.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 376cfb068165507e19fa1071f64c0de7ed8598e4da481cbe2327bf6d6e2a5120
products:
  - SOQL and SOSL Reference
  - Platform Developer Content
---

# toLabel()

Translate SOQL query results into the language of the user who submits the query using the `toLabel` function.

**important:** Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

Any organization can use the `toLabel()` function.

`toLabel` uses the following syntax:

```soql
toLabel(object.field)
```

Use this function to return translated search results on:

- Regular, multiselect, division, or currency code picklist fields, whose values are returned by the relevant `describe` API call.
- Data category group and data category unique name fields.
- Recordtype names.
- Object History. `HISTORY` is supported on a limited basis. When a tracked field changes, the clause `SELECT toLabel(Field) FROM *History` returns the primary label of the changed field or the existing translated label. OldValue and NewValue fields in history objects also support the `toLabel` method, but the query returns translated values for only tracked changes on supported field types.

For example:

<!-- otherprops: soql -->

```codesegment
SELECT Company, toLabel(Recordtype.Name) FROM Lead
```

The returned records are translated into the language of the user who issued the query.

**note:** You can’t filter on the translated name value from a record type. Always filter on the master value or the ID of the object for record types.

`toLabel()` supports aliasing, which is required when the query includes the same field multiple times. For example:

```soql
SELECT Company, Status, toLabel(Status) translatedStatus FROM Lead
```

You can use the `toLabel()` method to filter records using a translated picklist value. For example:

<!-- otherprops: soql -->

```codesegment
SELECT Company, toLabel(Status)
FROM Lead
WHERE toLabel(Status) = 'le Draft'
```

The query returns lead records with a picklist value for Status equal to 'le Draft.' The comparison is made against the value for the user’s language. If no translation is available for the picklist, the comparison is made against the master values.

The following limitations apply to translated picklist values:

- The LIKE operator can only query on the label of the picklist, not on its API name.
- You can’t use the `toLabel()` function with the operator ORDER BY. SOQL always uses the picklist’s defined order.
- You can’t use the `toLabel()`function in a `WHERE` clause for division or currency ISO code picklists.
