Architecture: I18NInternationalizationThis document gives an overview of I18N in the context of this project. CoreThe core itself is kept language neutral. Except for debug log messages all output intended for users of the core is provided in form of parametrized objects or exceptions. It is up to the user of the core to provide appropriate I18N if required. EditorThe editor relies on the Swing Application Framework to provide the translation to the current locale of the user that has started the editor. The translation files itself are stored as resource bundle property files (see Backing a ResourceBundle with Properties Files ). The resource bundle property files are stored in the resource folder of the editor: /editor/src/main/resources/**/*.properties The main application resource bundle that contains the menu and toolbar resources as well as generic translations is stored as: /editor/src/main/resources/org/openpermis/editor/policy/Application.properties For each editor view there are separate property files that contain the translations for the various user interface elements of the corresponding view. /editor/src/main/resources/org/openpermis/editor/policy/view/resource/*.properties ExampleTo add a german translation for the main application resource bundle simply copy the Application.properties file and store the copy as Application_de.properties: $ cd editor/src/main/resources/org/openpermis/editor/policy $ cp Application.properties Application_de.properties $ vi Application_de.properties Then open the newly created Application_de.properties and replace all I18N specific entries with a german translation. |