> For the complete documentation index, see [llms.txt](https://guilhermesantos.gitbook.io/niro-health/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guilhermesantos.gitbook.io/niro-health/locale-i18n/serialization-options.md).

# Serialization options

You can pass additional options in the arguments to perform text transformations.

```json
{
  "hello": "$1",
}
```

```typescript
locale.translate('hello', 'niro you are cool.yesuppercase');
// output: NIRO YOU ARE COOL
```

* <mark style="color:blue;">.yesuppercase</mark> - Returns the value of the original string converted to uppercase.
* <mark style="color:blue;">.yeslowercase</mark> - Returns the value of the original string converted to lowercase.
* <mark style="color:blue;">.yestrim</mark> - Removes the leading and trailing whitespace.
* <mark style="color:blue;">.space\[count]</mark> - Add x spaces to the end of the text.
* <mark style="color:blue;">.repeat\[count]</mark> - Repeat x times the value.

```typescript
locale.translate('hello', 'Repeat this .repeat[2]');
// output: Repeat this Repeat this
```

> You can use the options in inheritance nesting

```json
{
  "hello": "$1",
  "speak": "Thanks for use!",
}
```

```typescript
locale.translate('hello', '.speak.space[1].repeat[2]');
// output: Thanks for use! Thanks for use!
```

{% hint style="success" %}
With this you are able to change every aspect of your text.
{% endhint %}
