---
schema_version: "1"
id: 3c11868434d9a8f6b564d008c2c57f0ce5f3ca97220b8e5a91c4233de5e3ecd3
title: toLabel(fields)
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-sosl-tolabel.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-soql-sosl/guide/sforce-api-calls-sosl-tolabel.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 357749fb1d1a8ed21f9516837ace03125ba0ff072c31b1be895967161cd02f4b
products:
  - SOQL and SOSL Reference
  - Platform Developer Content
---

# toLabel(fields)

Use toLabel(_fields_) to translate SOSL query results into the user’s language.

Any organization can use the `toLabel()` method. It’s particularly useful for organizations that enabled the Translation Workbench.

```soql
toLabel(object.field)
```

For example:

```soql
FIND {Joe} RETURNING Lead(company, toLabel(Recordtype.Name))
```

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.

You can use the `toLabel()` method to filter records using a translated picklist value. For example:

```soql
FIND {test} RETURNING Lead(company, toLabel(Status) 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.

**note:** The `toLabel()` method cannot be used with the [ORDER BY _Clause_](https://developer.salesforce.com/docs/platform/salesforce-soql-sosl/guide/sforce-api-calls-sosl-select-order-by-with-limit.md). Salesforce always uses the order defined in the picklist, just like reports.

The `toLabel` function supports aliasing. In addition, aliasing is required when the query includes the same field multiple times. For example:

```nolang
FIND {Joe} RETURNING Lead(company, toLabel(Recordtype.Name) AliasName)
```
