![]() |
||||
|
|
||||||||
Introduction to![]() |
INTRODUCTION |
What is SpectrJ ? | ||||
|
||||
Why SpectrJ ? | ||||
|
||||
Learning objectives | ||||
|
||||
|
About
Read me
Languages (internationalization of SpectrJ)
LANGUAGES By default the base installation is provided for English and Greek languages only. There are three types of objects where the "translation" has to be applied if you wish to implement the SpectrJ in your preferred language. These objects are: A. java programs, B. html pages, C. images with text. Following the instructions bellow, will assure automatic recognition and use of the new language by the SpectrJ. If you followed the standard installation, the base directory mentioned below is C:\Program Files\ImageJ\plugins\SpectrJ |
||
A. | eExercise (java program) | |
The internationalization here is based on the JAVA-language standards. There is a subdirectory "Locales", under the base directory, where the different language files should exist. By default there should be the following three files: spjBundle.properties - the base file that should not be changed spjBundle_el.properties - the greek language file spjBundle_en.properties - the english language file (base file copy) These are text files with comment lines (starting with #) and parameters lines. Each parameter line starts with the parameter name, follows three characters (space, =, and space), and then is the parameter value to the end of the line. The value is in UNICODE representation, see below, except for the base and the english language files. The steps you should follow are: |
||
a. | Make a copy of the spjBundle.properties file and name it spjBundle_??.txt where "??" should be the two-letter ISO-code for your language. For example el - greek en - english es - spanish fr - french it - italish pl - polish pt - portuguese sv - swedish |
|
b. | Open the txt-file with simple text editor (say Notepad) and replace the text in the value part of the parameters with your translation. Do not change the names. It is not necessary to translate the comments. Please, remember that each parameter (name = value) should be on one line (there is a "\n" command in the text for breaking line if this is necessary), no matter how long it is. | |
c. | Optionally, and only if your language is none of the above listed, you should update in your text-file the parameter allLanguages. Currently it is allLanguages = enelesfritplptsv and it should be allLanguages = enelesfritplptsv?? where ?? is your language ISO-code. Then, you should add a new parameter ??_Language = ??????? after the last Language parameter with ??????? being the name of your language (this will appear on particular button on the SpectrJ menu). |
|
d. | Convert the spjBundle_??.txt file to UNICODE naming it spjBundle_??.properties. To convert to UNICODE you can use the JAVA's native2ascii program native2ascii inputfile outputfile This program is included in the Java Development Kit that can be downloaded for free (as of June 2006, Java 2 Platform Standard Edition JDK 5.0 Update 6) from http://java.sun.com/j2se/1.5.0/download.jsp Under MS Windows the JDK is installed by default under the C:\Program Files, so in this case open the Command Prompt window, change to the Locales subdirectory, and run "c:\Program Files\Java\jdk1.5.0_06\bin\native2ascii" spjBundle_??.txt spjBundle_??.properties (all in one line). It is not recommended to remove the txt-file (it is good to save it somewhere out of the SpectrJ for the case you would like to correct your translation). |
|
The english language spjBundle_en.properties file can also be updated, say to correct our english. This can be done directly on the properties file without transforming it to UNICODE. But, please do not change the base spjBundle.properties file. | ||
B. | ExerciseHelp (html and images with overlying text) | |
In order to have also the ExerciseHelp available in your native language you should prepare your language version of the Help. Else, the english version will be used. The Help is a set of HTML-files and the "translation" task here is quite different. | ||
a. | Go to the directory ExerciseHelp and copy all the EN subdirectory (english version) to a new one named ?? where ?? is the two-letter ISO-code for your language (see above) in capital-letter case. | |
b. | Go to the new subdirectory and edit one by one the HTML-files with your preferred html-editor (you can use also the Notepad under MS Windows). Translate, whenever it is necessary the english text (not the html commands) to your language. Please, be careful not to change the overall shape of the html-page as it has predefined size that can not be changed nor the content can be scrolled. So, it is preferable to use WYSIWYG-type html-editor. | |
c. | Under the ??\images subdirectory there are some images used by the html-pages that have english-version text. Most of them are simply screen copies from running the SpectrJ. You can replace them with the corresponding taken while running SpectrJ in your language after the step A. above (do not change the image file names). Under MS Windows, use Alt-PrintScreen key combination on your keyboard to copy the active window, then paste it (usually with Ctrl-V keys) to your image-editor, get the necessary part of the image resize it to the "english"-version image's size and replace the original image file with the new. This should be done for the images: Intro1.jpg Intro2.jpg Tasks.jpg Detect.jpg Extract.jpg Classify.jpg Analyze.jpg Result.jpg The text on two more images should be changed directly using your image editor. These are SpectrJ_title.jpg spectr_extract.jpg Please, be careful with the jpg-compression (high values could make unclear the resized image)! |
|
C. | The "translation" of the eLesson is similar. There are html-pages and lot of images with text on them. If there is no your language version of the lesson, the english version will be used. | |
a. | Go to the directory eLesson and copy all the EN subdirectory to a new one named ?? where ?? is the two-letter upper-case ISO-code for your language (see above). | |
b. | Go to the new subdirectory and edit one by one the HTML-files with your preferred html-editor (you can use also the Notepad under MS Windows). Translate, whenever it is necessary the english text (not the html commands) to your language. Please, be careful not to change the overall shape of the html-page as it has predefined size that can not be changed nor the content can be scrolled. So, it is preferable to use WYSIWYG-type html-editor. |
|
c. | Finally, there are about sixty images that should be edited directly with your preferred image-editor. Most of them are under the subdirectory eLesson\??\images SpectrJ_title.jpg (the same as in ExerciseHelp) wavelengths.jpg Image1_1d.jpg Image1_2a.jpg spic-sun-ant.jpg SunCenter.jpg Image4_1b.jpg Image4_3.jpg m45_m11_m3.jpg the other are buttons and images for interactive displaying, that are under particular subdirectories: eLesson\??\images\drop-rainbow\ button_all.gif button_next.gif raindrop?.jpg (? is 1,2,3,4) eLesson\??\images\spectra_em_ab\ spectraEmAbs_button?.gif (? is 0,1,2,3) spectraEmAbs?.jpg (? is 0,1,2,3) eLesson\??\images\planck_graphs\ planck_button5.gif planck?.jpg (? is 1,2,3,4,5) eLesson\??\images\elements_spectra\ Element_base_ab.gif Element_base_em.gif Element_ab99.gif Element_em99.gif eLesson\??\images\hipparcos_h-r\ button?.jpg (? is 1,2,3) hip_hr?.jpg (? is 1,2,3) eLesson\??\images\evolution\ ev_base?.jpg (? is 1,2) ev_?4.jpg (? is dwarf,normal,giant,super) eLesson\??\images\cluster_evo\ button_?.jpg(? is 0,all) evolution_?.jpg(? is 0,8,256,3000,8000,all) eLesson\??\images/smc_ages\ smc_age?.jpg (? is 0,1,2,3,4,5,6,7,8) |