Changing Date format to en-us while culture is fr-ca(在文化为 fr-ca 时将日期格式更改为 en-us)
问题描述
我正在对一个法语网站进行本地化.但是我不应该将日期格式更改为法语.即使文化设置为 fr-ca,它也必须保持 en-us 格式,即当其余内容为法语时,日期格式仍应为英语(en-us).
I'm working on localizing a website in French. However I am not supposed to change the date format to French. It must remain as per en-us format even if the culture is set to fr-ca i.e, when rest of the contents are in French, the date format should still be in English(en-us).
推荐答案
出乎意料的是,我得到了一个非常简单的答案.在设置 Culture 和 UICulture 时,我需要做的就是将 Culture 属性设置为始终 en-us.这将导致始终以英文显示日期格式.
Surprisingly I got a very simple answer. While setting Culture and UICulture, all I need to do is to set the Culture Property to en-us always. This will result in showing the date format in English always.
这篇关于在文化为 fr-ca 时将日期格式更改为 en-us的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在文化为 fr-ca 时将日期格式更改为 en-us


基础教程推荐
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- 如何激活MC67中的红灯 2022-01-01
- SSE 浮点算术是否可重现? 2022-01-01
- 将 XML 转换为通用列表 2022-01-01
- c# Math.Sqrt 实现 2022-01-01