In DOS
Native2ascii resources_src.properties resources_zh_tw.properties
UTF-8 translation tools with Chinese: Native2ascii.exe | 06-9-8 5:27
Java came with a coded conversion tool, Native2ascii.exe, in the Java Bin directory, such as:/jdk1.5.0_07/bin/native2ascii.exe.
If Java is installed, it can be executed directly under DOS commands. If it is not installed, you will need to set or write the full path in the paths, otherwise DOS cannot find the file. However, if there are no additional parameters at execution time, the result is waiting for input, so there is no display.
However, if you simply typed three parameters, you can see the description of the operation parameters:
C:/Documents and settings/administrator/desktop >native2ascii arg1 arg2 arg3
Usage: native2ascii [-reverse] [-encoding encoding] [input file [output file]]
So, for the liferay translation is too bad, sometimes want to modify, a total of three files involved.
Language.properties--Original English
Language_zh_cn.properties--Chinese UTF-8 format, need special tools to view
Language_zh_CN.properties.native--Chinese, readable
They are in the content directory in the Portal-ejb.jar package, you can use WinZip to extract the modified and then add back.
The method of specific modification:
1, traditional-simplified, with Word open Language_zh_CN.properties.native, select All, and then click the toolbar in the conversion button, and then make the necessary changes (can refer to pure English language.properties), Save as plain text format.
2. Code conversion:
C:/Documents and settings/administrator/desktop >native2ascii-encoding UTF-8 Language_zh_CN.properties.native Language _zh_cn.properties
3, then compress the file back to the Portal-ejb.jar package, restart the application server or reload the Liferay.
In addition, you can also use other specialized tools to directly edit UTF-8 encoded files, such as: PROPERTIESEDITOR.JNLP, in fact, ultraedit even word, etc. also have to deal with the encoding method, but not too convenient to use.