Netbeans 菜單和 i18n (Netbeans menu and i18n)


問題描述

Netbeans 菜單和 i18n (Netbeans menu and i18n)

I have a netbeans project, I want to internatialize it. I have a menu as wizards, how can I upload data from bundles instead of strings in it.

This is how it looks like now:

@ActionID(category = "Wizard", id = "com.xxx.xxx.EntWizWizardAction")
@ActionRegistration(iconBase = "com/xxxx/resources/wizard.png",
displayName = "Entities Wizard")
@ActionReferences({
@ActionReference(path = "Menu/Wizard", position = 0),
@ActionReference(path = "Toolbars/Wizard", position = 0)
})

Thanks!

‑‑‑‑‑

參考解法

方法 1:

Netbeans automatically does Internationalization for you this page Here explains it quite well  Not sure if this was what you were looking for 

A basic summary: Switch Automatic Internationalization On

1.Select the root node of your Form in the Navigator Window. 

2.In the Properties window, select the checkbox in the Automatic Internationalization property. 

If you need to have the Bundle.properties file in a different location, you can click the ellipsis (...) button to the right of the Properties Bundle File and choose a location or directly type the path in the property's text field.

3.In the Projects window, double‑click the Bundle.properties node in the Projects Window or right‑click the node and choose Edit. 

The properties file is opened in the Source Editor. As you can see, all appropriate Keys and Values for Form FindDialog.java are generated. (The name of each key is derived from the form file name and the component Variable name. For example, the key FindDialog.jLabel1.text is generated for a component with the variable name jLabel1 placed in form file FindDialog. The value jLabel1 represents component's Text property in this example.

(by EK.Ayvadia)

參考文件

  1. Netbeans menu and i18n (CC BY‑SA 3.0/4.0)

#internationalization #java #netbeans #netbeans-7






相關問題

志願者翻譯對 Delphi 2009 應用程序進行本地化的過程? (Process for localization of Delphi 2009 app by volunteer translators?)

Netbeans 菜單和 i18n (Netbeans menu and i18n)

Menggunakan Perpustakaan Penutupan pada aplikasi Phonegap (Android) (Using Closure Library on Phonegap(Android) application)

支持 SDK 但不支持 PhoneGap 的印度語語言 (Indic Language Support for SDK but not PhoneGap)

翻譯 symfony2 路由錯誤 (translation symfony2 routing error)

Django 沒有正確翻譯網站 (Django not translating the site properly)

django模型翻譯404 (django modeltranslation 404)

您是否知道用於編輯/翻譯資源(.rc)文件的好的程序? (Do you know of a good program for editing/translating resource (.rc) files?)

Struts 2 動作調用丟失 xwork i18n 語言設置 (Struts 2 action call loses the xwork i18n language setting)

移動應用測試 (Mobile application testing)

nuxt-i18n 的延遲加載語言環境 (Lazy load locales for nuxt-i18n)

你能在 next.config 中獲取數據嗎 (Can you fetch data in next.config)







留言討論