Forum Discussion
Can we traslate oAuth Prompt Text and Title to preferred language
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-MSFTAug 04, 2022
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- Lakshmi_145Aug 04, 2022Iron Contributor
We have already done the localization. It will take the user preferred language while initialization.
Later we have changed the user preferred language , but language of Oauth prompt is not getting changed. It will be the same language which is set at the initialization time.
Please find the attachment for Oauth prompt. Its values will be English if we have initialized in English and later if we change to German , still the Oauth prompt will be shown in English only
Is it possible to change the Oauth prompt Title and Text to the user selected language.
- Nivedipa-MSFTAug 05, 2022
Microsoft
Lakshmi_145 - Have you referred that below sample:
https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/app-localization/csharp