设置配置选项卡和固定选项卡(网站)文化与团队应用程序包(C#和Blazor)中的团队相同
我有一个Teams App软件包,该软件包是基于C#和使用Microsoft Teams App Project模板而创建的。该网站具有用于配置选项卡的页面,在选择“配置”选项卡中的项目之后,有一些页面在频道中固定。我使用了ASP.NET代码全球化和本地化,与浏览器语言配合得很好。但是,我想设置与团队(团队中当前的用户语言)相同的文化,而不是浏览器语言。有人在这种情况下工作,并将我指向正确的方向。
I have a Teams app package which is built on C# and Blazor created using Microsoft Teams App project template. This website has pages for config tab and after selecting the item in config tab, there are pages which gets pinned in a channel. I used ASP.net code globalization and localization, which works well with Browser language. But instead of browser language, I would like to set the culture same as Teams(Current User Language in Teams). Did anyone worked on this scenario and point me to the right direction.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我从AnafterRenderAsync中删除了设置文化和标签的代码,并在我的活动中添加了。它起作用。
I removed the code of setting culture and tab from OnAfterRenderAsync and addded in my event. It worked.
在您的选项卡中,您可以访问团队上下文对象。参见在这里有关此的信息。上下文对象是
locale
。这可能足以满足您的需求。Inside your tab you have access to the Teams context object. See here for more info on this. On the context object is a
locale
. That might be sufficient for your needs.