Forum Discussion
Lakshmi_145
Aug 01, 2022Iron Contributor
Can we traslate oAuth Prompt Text and Title to preferred language
We are using OAuthPrompt for signing verification in our bot project. Currently it is supporting only single language which is set at initialization time.
Is it possible to translate the OAuthPrompt Text and Title to user preferred language?
18 Replies
Sort By
- Nivedipa-MSFT
Microsoft
Lakshmi_145 - Could you please share which document are you referring for this?- Lakshmi_145Iron Contributor
We have added the below OAuthPrompt to waterfall dialog.
AddDialog(new OAuthPrompt(
nameof(OAuthPrompt),
new OAuthPromptSettings
{
ConnectionName = ConnectionName,
Text = "Please Sign In",
Title = "Sign In",
Timeout = 300000
}));For text and title, we have added resource string for supporting different languages. But its taking the language which is at the time of initializing only later on its not translating to the user preferred language.
While calling the OAuthPrompt , its not getting translated to the current language which is set.
return await stepContext.BeginDialogAsync(nameof(OAuthPrompt), null, cancellationToken);
- Nivedipa-MSFT
Microsoft
Lakshmi_145 - Could you please refer below document for Localization.
Globalization and localization in ASP.NET Core | Microsoft Docs
Localization in .NET | Microsoft Docs
Could you please refer below sample also:
Microsoft-Teams-Samples/samples/app-localization/csharp at main · OfficeDev/Microsoft-Teams-Samples (github.com)
Please let us know if you have any other query. Thanks