> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.itential.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server.

# toLocaleUpperCase

> Use the toLocaleUpperCase task to convert a string to uppercase according to locale-specific case mappings.

The `toLocaleUpperCase` task converts a string value to uppercase according to locale-specific case mappings. The locale is based on the language settings of the browser. For most languages this task functions identically to `toUpperCase` and produces the same output; however, certain languages may behave differently — for example, Turkish has case mappings that differ from the default Unicode case mappings.

## Potential use case

Suppose you have a dataset in lowercase format and you want to display it in uppercase. Use the `toLocaleUpperCase` task to convert the entire dataset to uppercase characters.

## Properties

| Incoming | Type   | Description                                                                                   |
| :------- | :----- | :-------------------------------------------------------------------------------------------- |
| `str`    | String | Required. The string to convert to uppercase.                                                 |
| `locale` | String | The locale to use for uppercase conversion, for languages with locale-specific case mappings. |

| Outgoing          | Type   | Description                                                                                        |
| :---------------- | :----- | :------------------------------------------------------------------------------------------------- |
| `uppercaseString` | String | A new string representing the input string converted to uppercase according to the current locale. |

## Example

In this example, `str` is given the reference variable `"hello world"` in lowercase letters. The `locale` variable is only populated for languages such as Turkish, which require specific letter capitalizations for meaning.

![](/_fern-img/030b73d4a89bfafc831a9f83c53dc82e2226a0dad7544a7dcfa995dcc214cdf8.webp)

The outgoing result shows all letters converted to uppercase: `"HELLO WORLD"`.

![](/_fern-img/16faa73e18cf0cdf732fc716d68c35790be919d9a41ce9e7e1444f18c3883b23.webp)

## Related reading

For more information, see the [Locale](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/Locale) article on MDN.