Welcome to WebmasterWorld Guest from 34.201.121.213

Forum Moderators: bill

Message Too Old, No Replies

Simple Chinese & Traditional Chinese Translation problem

     
12:39 pm on Nov 2, 2004 (gmt 0)

New User

10+ Year Member

joined:Nov 2, 2004
posts:9
votes: 0


Hi guys,

It's now day 9 in my eternal struggle to post an english site in traditional and simplified chinese. I'm using big5 as my encoding for the traditional site and gb2312 for the simplified. Do I now "have" to specify font types in my CSS?

I do everything in Dreamweaver 2004 and have only this week started spending time in code view so kiddy-gloves would be appreciated.

I've posted a one page example of the site at <snip>

P.S. Bill (hereafter referred to as 'Superman'), if you're out there somewhere, I've read your posts on the matter. I tried that snippet you posted.

<html lang="zh">
<head>
<meta http-equiv="content-type" content="text/html;charset=gb2312">
<meta http-equiv="content-language" content="zh">

Does that zh bit have to be there for this to work? I tried it without success. Do I need to re-paste in the text from word each time I change the code? -

[edited by: Woz at 2:55 am (utc) on Nov. 5, 2004]
[edit reason] deleted URL as problem is now fixed. [/edit]

9:25 pm on Nov 2, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 24, 2003
posts:99
votes: 0


hi there, just went and had a look. i think there are several possible causes here:

1. pasting from word into html. you need to ensure that word has set the encoding correctly in the first place (microsoft products sometimes have issues if you are not using the localised version; are you using a chinese version of word?). try pasting text into a standard multilingual non-microsoft text editor first, saving as correct encoding, and then moving to html.

2. dreamweaver. some versions of dreamweaver have difficulty using characters other than the language version used. so some English versions of dreamweaver only handles English characters correctly, no matter what the encoding. are you using a Chinese version of dreamweaver?

3. the html lang line should be included. this will ensure that site displays correctly on computers that are set up for multiple languages (e.g. in a student lab or in an internet cafe frequented by travellers) as the previous computer user may have set the "view" "text encoding" to a different charset.

Solutions for future ref:
1. get translation done directly in the source code. as long as translator sets charset at beginning of translation, and works with a true multilingual (or target language) html editor, you should not see these probems.

2. if you have to work between applications (e.g. word to html editor) use unicode, and then you can change back to specific charset.

hope this helps.

12:50 am on Nov 3, 2004 (gmt 0)

Administrator from JP 

WebmasterWorld Administrator bill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Oct 12, 2000
posts:15149
votes: 170


heh. I'm just a mild-mannered WebmasterWorld Mod... ;)

Welcome to WebmasterWorld stockstreet!

a2ztranslate has given you some excellent advice. I've seen the exact same thing happen with FrontPage using Chinese and Japanese. My solution when using source materials in Word was to copy and paste the material directly into the HTML editor part of FP, and to avoid the WYSIWYG part of the program altogether.

I assume that the Chinese content looks OK in the source document, right? I'll bet it's the WYSIWYG that's the culprit here.

One thing I have noticed is that I haven't had much luck using NotePad as an HTML editor on an English version of Windows for Japanese or Chinese content. I would suggest that you consider using a 3rd party HTML editor on the side for times when you're entering your double byte content.

If you're entering the Chinese from scratch, i.e., typing it in and not copy & pasting it, then FP or DW seem to be fine even on an English OS. I can type Japanese into FP's WYSIWYG interface just fine. All you need is to have the proper IME in place and you're good to go. It's when you paste from MS Office documents directly into a WYSIWYG editor that you get all this unwanted formatting or gibberish.

<html lang="[b]zh[/b]"> 
<head>
<meta http-equiv="content-type" content="text/html;charset=[b]gb2312[/b]">
<meta http-equiv="content-language" content="[b]zh[/b]">

The last meta tag there is a holdover from the Netscape days for me. Earlier versions of NN3.x and NN4.x were great at automatically switching the page encoding seamlessly when that tag was in the <head>. Some of today's browsers are a lot better at detecting encoding even without that tag, but I find that I get better consistency when I leave it in. It really beats forcing the user to manually switch encoding on your site.

Try out some of the suggestions here and tell us if you're able to fix the page.

8:16 am on Nov 3, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Oct 21, 2004
posts:321
votes: 0


the page can not be viewed by explorer in Chinese operation systems. Hope you fixed it ASAP. Best regards!

[edited by: Woz at 2:47 am (utc) on Nov. 5, 2004]
[edit reason] deleted URL as problem is now fixed. [/edit]

10:37 pm on Nov 3, 2004 (gmt 0)

New User

10+ Year Member

joined:Nov 2, 2004
posts:9
votes: 0


Hi guys,

To answer your questions, I'm using a mac with Office 2004 and DW MX 2004, both english versions.

One thing i did forget to do last time was to upload the template that the page at <snip> was based on. My encoding only has to be done on the template, yes? All the pages based on that template will update correctly, yes?

I've moved my text:

?

? ? (this is what I've just pasted from TextEdit). I've pasted it straight into code view in DW and it appears exactly like this, no extra code except for a few <p> tags.

I'm trying to put the <html lang="zh"> line in just before the <head> tag in my template, but DW comes up saying that I have an "Unbalanced #EndEditable tag" which I presume has to do with the fact that I'm using a template. Any ideas?

Also should the <html lang="zh"> line replace <html> or be below it like I've done below. I'm presuming it should not replace it.

<html>
<html lang="zh">
<head>
<meta http-equiv="content-type" content="text/html;charset=big5">

I've also detached the CSS sheet, just in case that was causing any trouble. I appreciate your patience.

Bill, do you have a site i could take a look at?

[edited by: Woz at 2:48 am (utc) on Nov. 5, 2004]
[edit reason] deleted URL as problem is now fixed. [/edit]

10:38 pm on Nov 3, 2004 (gmt 0)

New User

10+ Year Member

joined:Nov 2, 2004
posts:9
votes: 0


Aaaaaaand I just realised pasting chinese characters here is also a stupid idea........
11:54 pm on Nov 3, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 24, 2003
posts:99
votes: 0


I just checked your page again, i note that there is no space between html; charset
content="text/html;charset=big5"

should be
content="text/html; charset=big5"
don't know if this will make a difference?

Otherwise looks ok to me, i think that the encoding of the original source translation may have issues?

12:20 am on Nov 4, 2004 (gmt 0)

Administrator from JP 

WebmasterWorld Administrator bill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Oct 12, 2000
posts:15149
votes: 170


I'll have to admit that I know little about DW other than what I've read about it. And I'm not a Mac person...so...

Just switching the encoding tag on the page isn't going to change the text if it was corrupted to begin with. Maybe DW is changing the Chinese text in some way? Can you try making the page in TextEdit and see if it displays properly? Just keep all the code as-is from DW and put the Chinese in the body. Then view the page in a browser. If that works then there may be a global language setting in DW that is giving you problems.

8:46 pm on Nov 4, 2004 (gmt 0)

New User

10+ Year Member

joined:Nov 2, 2004
posts:9
votes: 0


"Then view the page in a browser. "

The browser locally has never been a problem - it always presents correctly. It's just when I upload it. Does that give any hints?

2:18 am on Nov 5, 2004 (gmt 0)

Administrator from JP 

WebmasterWorld Administrator bill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Oct 12, 2000
posts:15149
votes: 170


How about uploading without DW? Try to FTP the page...I'm reaching here because I don't know if DW does anything to the page when uploading.

It really sounds like your original source Chinese text is the culprit. Maybe you have a local Mac font that allows you to see the text?

Your Traditional Chinese page looks OK, but the Simplified Chinese is still looking bad. Does DW have an option for pasting text as Unicode or without formatting? My guess is still Office formatting in the source text.

2:42 am on Nov 5, 2004 (gmt 0)

New User

10+ Year Member

joined:Nov 2, 2004
posts:9
votes: 0


I FINALLY GOT THE F&^^(**G SORTED! You were on the right track Bill. I use CuteFTP for all my uploading and a colleague suggested that I was using ASCII instead of Binary for uploading. 10 minutes later and that page works.

Is this something obvious that everybody knows except for me?

Thanks for your patience - I really appreciate the effort you guys went to.

Woz

2:47 am on Nov 5, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member woz is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 13, 2000
posts:4823
votes: 0


Glad you got it working stockstreet.

Onya
Woz

5:20 am on Nov 5, 2004 (gmt 0)

Administrator from JP 

WebmasterWorld Administrator bill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Oct 12, 2000
posts:15149
votes: 170


Binary instead of ASCII? I'll have to remember that one. Glad you were able to get things sorted.
6:12 am on Nov 5, 2004 (gmt 0)

New User

10+ Year Member

joined:Nov 2, 2004
posts:9
votes: 0


Actually, it ended up being a mixture of these two things. To beat the Word problem, I saved the word doc as UTF-16, then opened it in TextEdit using the appropriate encoding - all pretty much like you guys suggested. Then the binary thing took care of the final problem.

Thanks again.

8:59 am on Nov 8, 2004 (gmt 0)

New User

10+ Year Member

joined:Nov 8, 2004
posts:8
votes: 0


it's a low level mistake,be careful!my brethren :)
9:25 am on Nov 8, 2004 (gmt 0)

Administrator from JP 

WebmasterWorld Administrator bill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Oct 12, 2000
posts:15149
votes: 170


would you care to explain that comment cnmoto?

...and welcome to WebmasterWorld.

1:14 am on Nov 9, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 24, 2003
posts:99
votes: 0


hi again, we also do most of our work on macs, and have found that most MS products for mac dont fully support multibyte charcters in native encoding and some apps (IE in particular) have similar problems with unicode.

glad to see you got it sorted, get yourself an HTML knowledgeable translator next time and save yourself all the pain (we couldnt work any other way!)