<div class="meta" robots="noindex">

</div>

Method

# Currency.ToText

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2020r2. Please use `Currency.ToString<currency.tostring>` as a replacement.

</div>

## Description

Converts a currency value to a Text value using the specified locale.

## Notes

To display the currency symbol, you need to pass in a locale. The currency symbol is displayed before or after the number as specified by the locale settings.

If no locale is specified, then Locale.Raw is used.

## Sample code

Convert Currency to Text:

``` xojo
Var c As Currency = 123.45

Var t As Text
t = c.ToText ' t = "123.45"
```

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

In order to display the currency symbol you need to provide a locale:

``` xojo
Var c As Currency = 123.45

Var t As Text
Var locale As New Xojo.Core.Locale("en-US")
t = c.ToText(locale) ' t = $123.45
```

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

This code displays a value using French Canadian locale with the currency symbol after the number:

``` xojo
Var c As Currency = 123.45

Var t As Text
Var locale As New Xojo.Core.Locale("fr-CA")
t = c.ToText(locale) ' t = 123,45 $
```

## Compatibility

All project types on all supported operating systems.

## See also

`Currency</api/data_types/currency>` parent class; `Currency.FromText</api/deprecated/deprecated_class_members/currency.fromtext>`
