[opencms-dev] the attachment is a Chinese language module

Shi Yusen shiys at langhua.cn
Thu Feb 23 15:37:30 CET 2006


Hi there,

The attachment is a Chinese language module. It's developed on OpenCMS
6.0.3(I know I am late). It's free for you but you have to make a change on
OpenCMS source code:

1. edit /org/opencms/i18n/CmsMessages.java,
change: return m_resourceBundle.getString(keyName);
to:
            	// modified by Shi Yusen, shiys at langhua.cn
            	String value = m_resourceBundle.getString(keyName);
            	if(m_locale.getLanguage().equals("zh") &&
!OpenCms.getSystemInfo().getDefaultEncoding().equalsIgnoreCase("ISO-8859-1")
) {
            		try {
						value = new
String(value.getBytes("ISO-8859-1"),
OpenCms.getSystemInfo().getDefaultEncoding());
					} catch
(UnsupportedEncodingException e1) {
						// do nothing
					}
            	}
        		return value;

2. rebuild and deploy opencms.jar

3. set the OpenCMS default encoding to UTF-8.

4. restart the OpenCMS Servlet and enjoy it.

Benefit: now you can add and change resource bundles in the OpenCMS
workplace directly.

Regards,

Shi Yusen/Beijing Langhua Ltd.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cn.langhua.opencms.workplace_2.0.8.zip
Type: application/octet-stream
Size: 122972 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060223/ba801069/attachment.obj>


More information about the opencms-dev mailing list