月份的UWP DatePicker自定义字符串 [英] UWP DatePicker custom strings for month

查看:57
本文介绍了月份的UWP DatePicker自定义字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为非英语用户做UWP申请。我需要使用DatePicker,但我不喜欢月份的名称是用英语写的,我也不想使用数字值显示月份。如何设置自己的字符串列表以在月份选择器上显示呢?

I am doing UWP application for non English users. I need to use DatePicker but I don't like that the months' names are written in English, I also dont want to show month with their numeral values. How can I set my own list of string to show it on the months picker?

推荐答案

如果将地区从英语更改为西班牙语或其他地区,则月份名称将更改为西班牙语或别人的语言。这意味着几个月和一天的名字,例如星期五,星期一等。从该区域获取名字。

If you change the region from english to spanish or someone else region then the months names is to be changed to spanish language or someone else language. This mean the name for months and day like Fri, Mon, etc, Is get the name from region. And is not fixed with the english name.

更新:

尝试使用将其放置在InitializeComponent()之后或之前;

Try to put this somewhere when is after or before InitializeComponent();

Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("ka-GE"); // Georgia culture code. I'm not sure this is correct.

这篇关于月份的UWP DatePicker自定义字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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