什么是CultureInfo.GetCultures是.NET Core [英] What is the equivalent of CultureInfo.GetCultures is .NET Core

查看:115
本文介绍了什么是CultureInfo.GetCultures是.NET Core的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

直接问一个问题,.NET Core相当于 CultureInfo.GetCultures 是什么?

Straight forward question really, What is the equivalent of CultureInfo.GetCultures is .NET Core?

为了澄清,这与 GetCultureInfo 不同因为只能得到指定的区域性(即不进行枚举)

Just to clarify, this isn't the same as GetCultureInfo as that only gets a specified culture, (i.e. does not enumerate it)

推荐答案

没有一种很好的方法来枚举所有区域.NET Core中支持的文化。 2.0。在.NET Core 2.0中,已经针对Windows和* nix实现了对基础本地化系统的相应查询,从而使该API可用。

There isn't a good way to enumerate all supported cultures in .NET Core < 2.0. In .NET Core 2.0 the respective queries to the underlying localisation systems have been implemented for windows and *nix, making this API available.

这篇关于什么是CultureInfo.GetCultures是.NET Core的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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