Eclipse/SWT DateTime 中的日本帝国日历支持

发布于 2024-12-28 01:17:19 字数 414 浏览 4 评论 0原文

我正在测试 Eclipse/SWT DateTime 控件提供的日本帝国日历支持。我尝试了以下方法,但只得到了英文日历。

Locale localeImperialJapanese = new Locale("ja", "JP", "JP");
Locale.setDefault(localeImperialJapanese);
DateTime calendar = new DateTime(parent, SWT.CALENDAR);
//Code to show the calendar in a dialog.

然后尝试在控制面板 -> 中更改格式和区域设置区域和语言,但我可以看到日语文本,但看不到日本皇历。

缺少什么吗?我在这里做错了什么吗?有没有更好/更简单的方法来测试这个?

提前致谢。

I am testing Japanese Imperial Calendar support provided by Eclipse/SWT DateTime control. I tried the following but got the calendar in English only.

Locale localeImperialJapanese = new Locale("ja", "JP", "JP");
Locale.setDefault(localeImperialJapanese);
DateTime calendar = new DateTime(parent, SWT.CALENDAR);
//Code to show the calendar in a dialog.

Then tried changing format and locale in control Panel -> Region and Languages but I could see Japanese texts but not Japanese Imperial Calendar.

Something is missing? Am I doing anything wrong here? Is there any better/easier way to test this?

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

悲念泪 2025-01-04 01:17:19
Locale.setDefault(new Locale("ja", "JP", "JP"));

无法设置。它仅适用于系统区域设置。因此更改了系统区域设置并对设置进行了必要的更改。现在工作了!!!:)

Locale.setDefault(new Locale("ja", "JP", "JP"));

can't be set. It will work with the system locale only. Hence changed the System locale and made necessary changes to the settings. Now working!!!:)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文