关于FCKeditor在线编辑器,插入图片,提示信息,不能汉化的问题

FCKEditor文件上传提示信息的汉化
在FCKeditor中,虽然可以自动监测客户端语言,但是仍有小部分信息未能得到汉化。例如上传图片、Flash时,上传成功和上传失败的对话框提示信息均为英文,只要找到相应的提示文本,修改为中文即可。
这里以汉化上传图片时的提示信息为例:
用DW或者UE打开 FCKeditor/editor/dialog/fck_image 下的 fck_image.js 文件,首先找到438行,
把原文“Your file has been successfully uploaded”,替换为“文件已成功上传!”,同理,
第447行,“A file with the same name is already available. The uploaded file has been renamed to”替换为“同名文件已经存在。 刚才上传的文件已自动命名为:”,
第450行,“文件类型不正确!”替换“Invalid file type”,
第453行,“你可能没有足够的权限上传文件,请检查服务器设置。”替换“Security error. You probably don't have enough permissions to upload. Please check your server.”,
第456行,“'文件上传失败!错误号:”替换“Error on file upload. Error number:”,
第474行,“请选择要上传的文件”替换“Please select a file to upload”。
这样,就完成了汉化,对于flash上传界面的汉化,也是同样的步骤。

同上以上方法修改后,中文提示会是乱码,原因是fck_image.js文件的编码格式默认是gb18080,需要把fck_image.js文件的编码修改成utf-8就可以了。

删除上传图片时,浏览显示的英文:
fckeditor\editor\dialog\fck_image\fck_image_preview.html

找到

Lorem
ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas feugiat consequat diam.
Maecenas metus. Vivamus diam purus, cursus a, commodo non, facilisis vitae, nulla.
Aenean dictum lacinia tortor. Nunc iaculis, nibh non iaculis aliquam, orci felis
euismod neque, sed ornare massa mauris sed velit. Nulla pretium mi et risus. Fusce
mi pede, tempor id, cursus ac, ullamcorper nec, enim. Sed tortor. Curabitur molestie.
Duis velit augue, condimentum at, ultrices a, luctus ut, orci. Donec pellentesque
egestas eros. Integer cursus, augue in cursus faucibus, eros pede bibendum sem,
in tempus tellus justo quis ligula. Etiam eget tortor. Vestibulum rutrum, est ut
placerat elementum, lectus nisl aliquam velit, tempor aliquam eros nunc nonummy
metus. In eros metus, gravida a, gravida sed, lobortis id, turpis. Ut ultrices,
ipsum at venenatis fringilla, sem nulla lacinia tellus, eget aliquet turpis mauris
non enim. Nam turpis. Suspendisse lacinia. Curabitur ac tortor ut ipsum egestas
elementum. Nunc imperdiet gravida mauris.

去掉就可以了

你可能感兴趣的:(浏览器,Security,fckeditor,Flash,idea)