Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
The three JobScheduler user interfaces (JOC, JOE and JID) have been internationalized (i18n) to allow the support of languages such as Japanese and Russian. There is a separate file for each language, which means localisation (L10n) of these interfaces is relatively straightforward:
- JOC: you have to create an additional language file for your language. This is described in the Language section of our OperationsGUI Wiki page. We recommend you just copy and rename the English file and change the texts to your language.
...
Please use the IETF language codes when you are naming your language properties file and underscores ("_") as separators. For example, you would name a Japanese language file either "JOEMessages_ja.properties" or "JOEMessages_ja_JP.properties".
Conversion Notes
You have to take into account that take Java is not able to process .property files which are not encoded in ISO-8859-1. If you do not do this, it is likely that you will get an error when starting, for example, {{dashboard.com }}:
No Formatcode |
---|
[root@JobScheduler ~]#
/opt/sos-berlin.com/jobscheduler/scheduler/bin/dashboard.sh
Exception in thread "main" java.util.MissingResourceException: Can't
find bundle for base name
com.sos.dailyschedule.SOSSchedulerDashboardMain, locale en
at
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1427)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1250)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:777)
at com.sos.localization.Messages.getBundle(Messages.java:81)
at com.sos.localization.Messages.<init>(Messages.java:65)
at
com.sos.JSHelper.Basics.JSToolBox.setMessageResource(JSToolBox.java:69)
at com.sos.JSHelper.Basics.JSToolBox.<init>(JSToolBox.java:55)
at com.sos.i18n.I18NBase.<init>(I18NBase.java:63)
at
com.sos.dailyschedule.SosSchedulerDashboardMain.<init>(SosSchedulerDashboardMain.java:55)
at
com.sos.dailyschedule.SosSchedulerDashboardMain.main(SosSchedulerDashboardMain.java:50)
|
Here you have to carry out an intermediate step to convert from UTF-8 to ISO-8859-1, using the native2ascii
program, which is part of the Java JDK:
No Formatcode |
---|
native2ascii -encoding utf-8 SOSSchedulerDashboardMain_ja.orig SOSSchedulerDashboardMain_ja.properties
|
The content of the file may look a little bit strange after conversion )
No Formatcode |
---|
SOSDashB_Reseth1.Reset = \u30ea\u30bb\u30c3\u30c8 SOSDashB_Today = \u672c\u65e5\u5206\u8868\u793a SOSDashB_only_executedh1.executed = \u5b9f\u884c\u6e08\u306e\u307f\u8868\u793a SOSDashB_show_log_in_new_tab = \u30ed\u30b0\u3092\u65b0\u3057\u3044\u30bf\u30d6\u3067\u8868\u793a SOSDashB_open_schedulerh1.scheduler = JobScheduler\u3092\u958b\u304f SOSDashB_only_stand_alone_jobs = \u30b8\u30e7\u30d6\u306e\u307f\u8868\u793a SOSDashB_only_job_chainsh1.chains = \u30b8\u30e7\u30d6\u30c1\u30a7\u30fc\u30f3\u306e\u307f\u8868\u793a SOSDashB_only_with_error = \u30a8\u30e9\u30fc\u306e\u307f\u8868\u793a SOSDashB_only_runningh1.running = \u5b9f\u884c\u4e2d\u306e\u307f\u8868\u793a SOSDashB_only_successfull = \u6210\u529f\u306e\u307f\u8868\u793a SOSDashB_only_lateh1.late = \u9045\u5ef6\u306e\u307f\u8868\u793a SOSDashB_only_waiting = \u5f85\u6a5f\u306e\u307f\u8868\u793a SOSDashB_start_nowh1.now = \u5373\u6642\u5b9f\u884c SOSDashB_close = \u9589\u3058\u308b SOSDashB_new_logh1.log = \u65b0\u898f\u30ed\u30b0 SOSDashB_NAME_TAB_HISTORY = \u5b9f\u884c\u5c65\u6b74 SOSDashB_NAME_TAB_PLANNEDh1.PLANNED = \u5b9f\u884c\u8a08\u753b SOSDashB_NAME_TAB_JOBNET = JobNet |
No Format |
SOSDashB_FROM = \u81ea
|
Now include the ISO property file in the jar-file.
Use the "update" function of the jar-utility, don't create a new jar:
No Formatcode |
---|
C:\temp\jars>jar -uvf com.sos.dailyschedule.jar com/sos/dailyschedule/SOSSchedulerDashboardMain_ja.properties
Add: com/sos/dailyschedule/SOSSchedulerDashboardMain_ja.properties
|
...
When all goes well, your interface should look something like this (JID Interface in Japanese):
See also: Support of Unicode with UTF-8 encoding for languages such as Japanese in addition to English
Get in touch with us if you have any problems not covered by the above or wish to check if your language is already being localised.
...