如何将自定义区域性(en-cn)添加到Azure AppService(WebApp)? [英] How to add a custom culture (en-cn) to Azure AppService (WebApp)?

查看:79
本文介绍了如何将自定义区域性(en-cn)添加到Azure AppService(WebApp)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。



我有一项任务是添加新的自定义文化(en-cn)。编码方面没有问题,我使用了CultureAndRegionInfoBuilder,但是我无法在Azure AppService上创建这种文化,Register方法抛出异常并需要额外的权限。



你见过类似的东西吗?

解决方案

抱歉给您带来不便!您无法在Azure应用服务上创建自定义文化。 文化是标准操作系统的一部分,需要更改注册表才能修改或添加它们。  Azure App Service
中运行沙箱
哪个没有允许代码或脚本修改注册表。  这是沙箱限制。您可以使用其他解决方案来支持ASP.NET网站中的国际化(i18n)。你可以参考这个博客可能是
有用。
https:/ /blogs.msdn.microsoft.com/benjaminperkins/2018/06/11/implementing-custom-cultures-cultureinfo-localize-azure-app-service/



SO





Hi there.

I have a task to add a new custom culture (en-cn). There isn't a problem from coding side and I used CultureAndRegionInfoBuilder for this but I can't create this culture on the Azure AppService, Register method throws an exception and requires extra-permissions.

Have you met something similar?

解决方案

Sorry for inconvenience! You cannot create a custom culture on an Azure App Service. Cultures are part of the standard operating system and require changes to the registry to modify or add them. Azure App Service runs in a sandbox which does not allow code or script to modify the registry. This is sand box limitation. You can use other solution to support internationalization (i18n) in your ASP.NET website. You may refer to this blog might be helpful. https://blogs.msdn.microsoft.com/benjaminperkins/2018/06/11/implementing-custom-cultures-cultureinfo-localize-azure-app-service/.

Referencing duplicate thread in SO.



这篇关于如何将自定义区域性(en-cn)添加到Azure AppService(WebApp)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆