# GetLocalizedStringAsync(params object[])

> Resolves the localized string asynchronously, formatting it with the given arguments.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Localization](/engine/6000.7/script-reference/unity/localization.md)
* **Assembly:** UnityEngine.LocalizationRuntimeModule

## GetLocalizedStringAsync(Object\[])

```csharp
public Awaitable<string> GetLocalizedStringAsync(params object[] args)
```

### Parameters

**** (\[Object\[]]\(https\://learn.microsoft.com/dotnet/api/system.object)): Optional arguments that Smart String placeholders format against.

### Returns

| Type                                                                           | Description                                                                                                |
| ------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- |
| [Awaitable\<string>](/engine/6000.7/script-reference/unityengine/awaitable.md) | An awaitable that produces the formatted localized string, or an empty string when the reference is empty. |

### Remarks

Loads the table through the [ResourceDatabase](/engine/6000.7/script-reference/unity/localization/resourcedatabase.md) provider chain if needed, formats Smart String placeholders against the supplied arguments and [LocalizedString.LocalVariables](/engine/6000.7/script-reference/unity/localization/localizedstring/localvariables.md), and returns an empty string when the reference is empty. When [LocalizationSettings.PreferredLoading](/engine/6000.7/script-reference/unity/localization/localizationsettings/preferredloading.md) is [LoadingPreference.Synchronous](/engine/6000.7/script-reference/unity/localization/loadingpreference/synchronous.md), it resolves synchronously when the value is available and otherwise falls back to this asynchronous load.

Resolve a string and format it with an argument.

### Examples

```csharp
using Unity.Localization;
using UnityEngine;

namespace Unity.Localization.Samples
{
    public class LocalizedStringFormatAsyncExample
    {
        public async Awaitable Resolve()
        {
            var localizedString = new LocalizedString();
            localizedString.SetReference("My Strings", "GREETING");
            string playerName = "Sam";
            string text = await localizedString.GetLocalizedStringAsync(playerName);
            Debug.Log(text);
        }
    }
}
```
