---
title: "Translations client"
slug: "translations-client"
abstract: "Use the Translations client to fetch localized strings for labels and messages, with optional culture and parameter support."
---
# Translations client

The Translations client lets you retrieve localized strings from the Sitecore Content Hub internal localization system. You can use this to render culture-specific labels, messages, and UI elements in scripts.

## Get a localized string

Use `LocalizeAsync` to fetch a localized string by context and entry name. Optionally, you can specify a culture and a list of parameters to format the string. If no culture is provided, the method uses the default culture.

```csharp
string message = await MClient.Translations.LocalizeAsync(
    <CONTEXT_NAME>,
    <ENTRY_NAME>,
    <CULTURE>,
    new Parameter { Name = <PARAM_NAME>, Value = <PARAM_VALUE> }
);

```

If you don't need to specify a context name, you can use the simplified overload. This version defaults to the system context.

```csharp
string message = await MClient.Translations.LocalizeAsync(
    <ENTRY_NAME>,
    <CULTURE>,
    new Parameter { Name = <PARAM_NAME>, Value = <PARAM_VALUE> }
);

```

When parameters are provided, the client automatically applies formatting to insert their values into the localized template.

> [!note]
> If `<CONTEXT_NAME>` or `<ENTRY_NAME>` is null, empty, or consists only of whitespace, then both method overloads throw an error.