在Netbeans平台应用程序中更改语言环境 [英] Change locale in Netbeans platform application

查看:81
本文介绍了在Netbeans平台应用程序中更改语言环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将netbeans平台应用程序(7.1)的语言环境更改为"de".有人知道这是哪里吗?我在project.properties中尝试了netbeans_default_options =-locale de"行,但事实并非如此.

I need to change the locale of a netbeans platform app (7.1) to "de". Does anyone know where this is set? I tried the line netbeans_default_options="--locale de" in project.properties but that wasn´t it.

推荐答案

有两种方法.

1)将语言环境传递给Java参数:

1) Passing the locale to java arguments:

-Duser.language=de -Duser.region=DE

2)调用Locale.setDefault()

2) Call Locale.setDefault()

locale = new Locale("de", "DE");

这篇关于在Netbeans平台应用程序中更改语言环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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