|
1
|
export const metadata = { |
|
2
|
title: `Property Labels`, |
|
3
|
} |
|
4
|
|
|
5
|
# {metadata.title} |
|
6
|
|
|
7
|
In this guide, you'll learn about property labels in the Settings Module. |
|
8
|
|
|
9
|
## What is a Property Label? |
|
10
|
|
|
11
|
A property label sets a custom label and description for a property of an entity. For example, you can set the label of an order's `display_id` property to `Order Number`. |
|
12
|
|
|
13
|
The [PropertyLabel](/references/settings/models/PropertyLabel) data model represents a property label. It's associated with a property through its `entity` and `property` properties, and it stores the custom label and description in its `label` and `description` properties. |
|
14
|
|
|
15
|
Property labels are global, so they apply to all admin users. A property can have only one label. |
|
16
|
|
|
17
|
--- |
|
18
|
|
|
19
|
## Translatable Labels |
|
20
|
|
|
21
|
A property label's `label` and `description` are translatable fields, so they integrate with the [Translation Module](../../translation/page.mdx). You can store a different `label` and `description` for each of your store's [locales](../../translation/concepts/page.mdx#locales). |
|
22
|
|
|
23
|
You can manage a property label's translations from the [Medusa Admin](!user-guide!/settings/translations) or programmatically with the Translation Module. |
|
24
|
|
|
25
|
Then, when you retrieve a property label for a specific locale, Medusa returns the translated `label` and `description` for that locale. If the property label has no translation for that locale, Medusa falls back to the `label` and `description` values stored on the property label itself. |
|
26
|
|
|
27
|
--- |
|
28
|
|
|
29
|
## Property Labels in Data Tables |
|
30
|
|
|
31
|
When the dashboard generates the columns of a data table, it uses an entity's property labels as the column names. This lets you customize how columns are named across the dashboard. |
|
32
|
|
|
33
|
Learn more about data-table columns in the [Configure View Configurations](../configure-view-configurations/page.mdx) guide. |