# GetLocalizedLineAsync(Line,CancellationToken)

Method in [LineProviderBehaviour](/api/csharp/yarn.unity/yarn.unity.lineproviderbehaviour.md)

## Summary

Prepares and returns a [LocalizedLine](/api/csharp/yarn.unity/yarn.unity.localizedline.md) from the specified [Line](/api/csharp/yarn/yarn.line.md) .

```csharp
public abstract YarnTask<LocalizedLine> GetLocalizedLineAsync(Line line, CancellationToken cancellationToken);
```

## Parameters

| Name                                            | Description                                                                                                                        |
| ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| [Yarn.Line](/api/csharp/yarn/yarn.line.md) line | The [Line](/api/csharp/yarn/yarn.line.md) to produce the [LocalizedLine](/api/csharp/yarn.unity/yarn.unity.localizedline.md) from. |
| `CancellationToken` cancellationToken           | A cancellation token that indicates whether the process of fetching the localised version of `line` should be cancelled.           |

## Returns

A localized line, ready to be presented to the player.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.yarnspinner.dev/api/csharp/yarn.unity/yarn.unity.lineproviderbehaviour/yarn.unity.lineproviderbehaviour.getlocalizedlineasync.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
