# Localize label

**URL:** <https://jsonforms.discourse.group/t/localize-label/130>\
**Category:** General\
**Created:** [May 12, 2021, 10:44pm UTC](https://jsonforms.discourse.group/t/localize-label/130 "2021-05-12T22:44:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![discobot](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/discobot/32/3_2.png) [@discobot](https://jsonforms.discourse.group/u/discobot)\
**Post date:** [May 12, 2021, 10:44pm UTC](https://jsonforms.discourse.group/t/localize-label/130/1 "2021-05-12T22:44:49Z")

</div>

Hi team,

I am using React with jsonforms. Are there any way that I can localize the label text in schema.json?

_[[original thread](https://spectrum.chat/jsonforms/general/localize-label~02aa7b8d-c710-4850-8a65-5c41bf4d1c5b) by Huy Dang]_

---

<div class="post-metadata">

**Author:** ![discobot](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/discobot/32/3_2.png) [@discobot](https://jsonforms.discourse.group/u/discobot)\
**Post date:** [May 15, 2021, 12:21pm UTC](https://jsonforms.discourse.group/t/localize-label/130/2 "2021-05-15T12:21:05Z")

</div>

_[Benjamin Börngen-Schmidt]_

Hey,  
it is not possible to have it in the schema, but you can overwrite labels in the uiSchema. There is an example here: [jsonforms/util.tsx at master · eclipsesource/jsonforms · GitHub](https://github.com/eclipsesource/jsonforms/blob/master/packages/example/src/util.tsx)

---

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [May 17, 2021, 7:52am UTC](https://jsonforms.discourse.group/t/localize-label/130/3 "2021-05-17T07:52:46Z")

</div>

Hi @benjamin-b-s(benjamin-b-s), that’s not completely correct 😉 We often localize via JSON Schemas.

At the moment the title of the controls are determined this way:

1. If there is a `label` in the UI schema, then this is used, e.g. `{ type: ‘Control’, scope: ‘#/properties/name’, label: ‘Nombre’ }` would result in the label `Nombre`

2. If not, then the `title` in the JSON Schema is rendered, e.g. `name: { type: ‘string’, title: ‘Nom’ }` produces the label `Nom`

3. If both don’t exist then we take the property name from the JSON Schema and do some separation and upper casing, e.g. `name: { type: ‘string’ }` produces the label `Name`.

---

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [May 17, 2021, 7:54am UTC](https://jsonforms.discourse.group/t/localize-label/130/4 "2021-05-17T07:54:32Z")

</div>

Therefore for localization purposes we currently use one of two approaches:  
Either exchange the JSON Schema with localized `title` attributes and don’t use any labels in UI Schemas, or exchanging the UI Schema with the proper labels.

---

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [May 17, 2021, 7:55am UTC](https://jsonforms.discourse.group/t/localize-label/130/5 "2021-05-17T07:55:30Z")

</div>

Note that we’re looking into a more [generalized approach](https://github.com/eclipsesource/jsonforms/issues/1751) for one of the next versions of JSON Forms.

---

<div class="post-metadata">

**Author:** ![sdirix](https://yyz2.discourse-cdn.com/free1/user_avatar/jsonforms.discourse.group/sdirix/32/1073_2.png) [@sdirix](https://jsonforms.discourse.group/u/sdirix)\
**Post date:** [January 10, 2024, 7:40am UTC](https://jsonforms.discourse.group/t/localize-label/130/6 "2024-01-10T07:40:36Z")

</div>

As this post is still quite popular: JSON Forms now has built-in i18n support. See [here for the documentation](https://jsonforms.io/docs/i18n).
