---
schema_version: "1"
id: 14579dbd0cd0c0b87b0dabaa20673c7ab7b51e7bd15147d3f602ff024c5681dd
title: Dynamically Populating Label Parameters
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/labels/labels-parameters.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/labels-parameters.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: c43a4f118e6bd57959a5720a6b7d75291dd8aa8765d32936c09adee6ca8bce92
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# Dynamically Populating Label Parameters

Output and update labels using the `format()` expression function.

You can provide a string with placeholders, which are replaced by the substitution values at runtime.

Add as many parameters as you need. The parameters are numbered and are zero-based. For example, if you have three parameters, they will be named `{0}`, `{1}`, and `{2}`, and they will be substituted in the order they're specified.

Let's look at a custom label, `$Label.mySection.myLabel`, with a value of `Hello {0} and {1}`, where `$Label` is the global value provider that accesses your labels.

This expression dynamically populates the placeholder parameters with the values of the supplied attributes.

```nolang
{!format($Label.mySection.myLabel, v.attribute1, v.attribute2)}
```

The label is automatically refreshed if one of the attribute values changes.

**note:** Always use the `$Label` global value provider to reference a label with placeholder parameters. You can't set a string with placeholder parameters as the first argument for `format()`. For example, this syntax doesn't work:

```nolang
{!format('Hello {0}', v.name)}
```

Use this expression instead.

```nolang
{!format($Label.mySection.salutation, v.name)}
```

where `$Label.mySection.salutation` is set to `Hello {0}`.

