New to Telerik UI for WinFormsStart a free 30-day trial

Localization

Updated on Jul 29, 2026

Use RadAIPromptLocalizationProvider to localize the built-in text and tooltip text in RadAIPrompt. Create a class that derives from RadAIPromptLocalizationProvider and override the GetLocalizedString method. Return the localized value for each string ID that your application needs to localize and call the base implementation for all other IDs.

Create a Localization Provider

The following example localizes all text exposed by RadAIPromptStringId in English:

C#
public class CustomAIPromptLocalizationProvider : RadAIPromptLocalizationProvider
{
    public override string GetLocalizedString(string id)
    {
        switch (id)
        {
            case RadAIPromptStringId.InputItem_Text:
                return "Ask AI";
            case RadAIPromptStringId.OutputItem_Text:
                return "Response";
            case RadAIPromptStringId.InputView_NullText:
                return "Ask or generate content with AI ...";
            case RadAIPromptStringId.InputView_GenerateButton_Text:
                return "Generate";
            case RadAIPromptStringId.OutputView_CopyButton_Text:
                return "Copy";
            case RadAIPromptStringId.OutputView_RetryButton_Text:
                return "Retry";
            case RadAIPromptStringId.OutputView_CopyButton_ToolTip:
                return "Copy the response to the clipboard.";
            case RadAIPromptStringId.OutputView_RetryButton_ToolTip:
                return "Retry generating a response.";
            default:
                return base.GetLocalizedString(id);
        }
    }
}

Apply the Localization Provider

Set RadAIPromptLocalizationProvider.CurrentProvider before initializing the form or creating any RadAIPrompt controls.

C#
RadAIPromptLocalizationProvider.CurrentProvider =
    new CustomAIPromptLocalizationProvider();

RadAIPrompt aiPrompt = new RadAIPrompt();

Localizable Strings

String IDDefault valueDescription
InputItem_TextAsk AIThe text of the input view item.
OutputItem_TextOutputThe text of the output view item.
InputView_NullTextAsk or generate content with AI ...The placeholder in the prompt input field.
InputView_GenerateButton_TextGenerateThe text of the button that sends a prompt.
OutputView_CopyButton_TextCopyThe text of the button that copies a response.
OutputView_RetryButton_TextRetryThe text of the button that repeats a prompt request.
OutputView_CopyButton_ToolTipCopy the response to the clipboard.The tooltip for the copy button.
OutputView_RetryButton_ToolTipRetry generating a response.The tooltip for the retry button.

See Also