【发布时间】:2012-04-04 15:07:55
【问题描述】:
我已经创建了 DateTimePicker 控件。现在我想用这个添加本地化支持。
我已按照以下步骤操作。
- 在 ResourceFolder 中创建了 CustomControls.de-DE.resx。
- 在该 resx 文件中添加了一些常用字符串
- 将访问修饰符更改为 Public
- 在 csproj 文件中添加了
<SupportedCulture>de-DE;</SupportedCulture>。- 设置 System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("de-DE");在 sample.cs 文件之前 初始化组件()。
- 我的 DateTimevalue 是“ 2 天:3 小时(秒):5 分钟:32 秒(秒)
只获取默认语言,即英语。
我做错了什么?请任何人帮助我。我有什么遗漏吗?
【问题讨论】:
-
尝试在 app.xaml.cs 构造函数中更改 CurrentUICulture 而不是页面!
-
我试过这个。但没有变化。
-
添加properties/Resources.resx和添加Resources/Resources.resx有区别吗?
-
不这么认为,但通常我在属性下添加我的...
标签: windows-phone-7