如何自定义的CultureInfo的默认日历? [英] How to customize CultureInfo's default calendar?

查看:130
本文介绍了如何自定义的CultureInfo的默认日历?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要定制日历波斯,但设置的CultureInfo,因为这之后:

I want to customize calendar to persian but after setting CultureInfo as this:

CultureInfo fa = new CultureInfo("fa-IR",true);
Thread.CurrentThread.CurrentCulture = fa;

月份和日子的名称不改变,因此决定来覆盖默认日历。

name of month and days don't changed so decided to override default calendar.

我怎么能这样做?

推荐答案

您可以创建的CultureInfo的子类。它的属性将不会为只读,并可以分配给它。

You can Create a subclass of CultureInfo. The property of it will not be read only and you can assign to it..

这篇关于如何自定义的CultureInfo的默认日历?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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