What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Translation » Request: A translation program for website translation

Pages: (3): « First « 1 2 [ 3 ] Last »
Request: A translation program for website translation
Author: Message:
Choli
Elite Member
*****

Avatar
Choli

Posts: 4714
Reputation: 42
42 / Male / Flag
Joined: Jan 2003
RE: Request: A translation program for website translation
quote:
Originally posted by sock
I'm personally planning on convincing Patchou to use standard Hebrew Web character encoding.
what is that Hebrew web char. encoding? any special way of encoding??
Messenger Plus! en espaņol:
<< http://www.msgpluslive.es/ >>
<< http://foro.msgpluslive.es/ >>
:plus4:
06-10-2004 06:16 PM
Profile PM Find Quote Report
sock
Elite Member
*****

Avatar
Back in White! (with red stripes)

Posts: 1112
Reputation: 31
38 / Male / Flag
Joined: Nov 2002
Status: Away
RE: Request: A translation program for website translation
@Kian: What bothers me is mainly the usage of the paging file, not the CPU. FrontPage 2003 is nothing like its predecessors, and I like it better because it's simpler/lighter and it supports Hebrew well, even if it has less features.


quote:
Originally posted by Choli
what is that Hebrew web char. encoding? any special way of encoding??
I don't know what you know and don't know about this business, but I'll explain it anyway...

The actual character encoding I'm talking about is simply 1-byte ASCII: A certain range of characters in the second half of the ASCII table is reserved for international symbols - and each character set has different letters for the same range. If I type some Hebrew words in Notepad, save them as ASCII and send to you, you would see Latin characters (no matter what OS we have, it's still ASCII). That's why this method is problematic, and Unicode replaced it.

Unicode shows exactly the same thing everywhere. Indeed, universal code. So why not use Unicode on the Web? I suppose it might not work on pre-Unicode systems (I've never tried it). But it's also a waste of space and bandwidth, as Unicode characters are dual-byte (so they can contain all of the letters in the world).

So what's the solution? Using good old ASCII, and specifying a character set so the Web browser knows what letters to display. So I just save the PHP file as plain ASCII, and then Patchou could add the following line inside the <head> section of the Web pages which display the translation:

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1255">

This will tell the HTTP server to include that information when sending the file's header to Web browsers. This will tell the Web browser what character set should be used to display the page. This is the method used by most Hebrew Web sites, and all the main browsers support it.

This post was edited on 06-15-2004 at 08:10 AM by sock.
[Image: patchoulolhaxun7.jpg]
06-14-2004 04:44 AM
Profile E-Mail PM Find Quote Report
Mnjul
forum super mod
******

Avatar
plz wub me

Posts: 5396
Reputation: 58
– / Other / Flag
Joined: Nov 2002
Status: Away
O.P. RE: Request: A translation program for website translation
quote:
Originally posted by sock
I suppose it might not work on pre-Unicode systems (I've never tried it)

Well, if I get you right, what you said actually works :). A UTF-8 encoded page can be viewed correctly in Windows Me (under IE6). At least that's what I've tried - the Japanese characters and Chinese characters did show in my page -, so I suppose that a Unicode-encoded page still works (showing characters appropriately) under non-unicode windows (95/98/Me) 8-)

Also, the charset tag has actually been added to the page :D

quote:
Originally posted by sock
This will tell the HTTP server to include that information when sending the file's header to Web browsers.
Really? I think it is the browsers that "interprets" the meta tag...8-) If you use php, the server head thing must be output with Header function, I think...:rolleyes: Well, I could be wrong anyway :P

This post was edited on 06-14-2004 at 11:06 AM by Mnjul.
06-14-2004 11:04 AM
Profile PM Web Find Quote Report
Choli
Elite Member
*****

Avatar
Choli

Posts: 4714
Reputation: 42
42 / Male / Flag
Joined: Jan 2003
RE: Request: A translation program for website translation
quote:
Originally posted by sock
I don't know what you know and don't know about this business, but I'll explain it anyway...
yep, I thought you meant anything different from unicode. Thanks, anyway ;)
quote:
Originally posted by Mnjul
Really? I think it is the browsers that "interprets" the meta tag... If you use php, the server head thing must be output with Header function, I think... Well, I could be wrong anyway 
yes, it's the browser who interprets that. The META HTTP-EQUIV tag is sent inside the page and it's up to the browser care about it. However there may be a way that php can tell apache to send a special header with the same pourpose. In that case you won't see it in the code of the page
Messenger Plus! en espaņol:
<< http://www.msgpluslive.es/ >>
<< http://foro.msgpluslive.es/ >>
:plus4:
06-14-2004 11:34 AM
Profile PM Find Quote Report
Mnjul
forum super mod
******

Avatar
plz wub me

Posts: 5396
Reputation: 58
– / Other / Flag
Joined: Nov 2002
Status: Away
O.P. RE: Request: A translation program for website translation
quote:
Originally posted by Choli

yes, it's the browser who interprets that. The META HTTP-EQUIV tag is sent inside the page and it's up to the browser care about it. However there may be a way that php can tell apache to send a special header with the same pourpose. In that case you won't see it in the code of the page
Yep there is, just use this Header output:
header("Content-Type: text/html; charset=Blahblahblah");

However I suspect that Meta tag overrides this header when interpreted by the browser.
06-14-2004 11:38 AM
Profile PM Web Find Quote Report
sock
Elite Member
*****

Avatar
Back in White! (with red stripes)

Posts: 1112
Reputation: 31
38 / Male / Flag
Joined: Nov 2002
Status: Away
RE: Request: A translation program for website translation
quote:
Originally posted by Mnjul
A UTF-8 encoded page can be viewed correctly in Windows Me (under IE6).
Then the reasons are bandwidth/storage economy, and perhaps browser/OS compatibility.


As for the META HTTP-EQUIV tag, I could very possibly be wrong about what I said - but one thing's for sure, it does not override the server's header information. How do I know? The exact same HTML code (a Hebrew page with the above META tag included) was displayed fine (ie. in Hebrew) on one server, while on the other it wasn't.

I'm not sure exactly how this stuff works, but obviously the problematic server was sending wrong language information in the header, and it was overiding the META tag. Using header() with PHP corrected this behavior in the problematic server:

<? header("Content-type: text/html; charset=windows-1255"); ?>

All this made me theorize that HTTP servers interpret the META tag - and that the problematic server didn't do it (because of its configuration). But since the idea of the Web server interpreting META tags does seem strange, now I suspect that the problematic server was forcing western (Latin based) letters on all its pages, while the other one let the browser decide on it.

Time will tell what the case will be with the HTTP server on msgplus.net...
[Image: patchoulolhaxun7.jpg]
06-15-2004 08:06 AM
Profile E-Mail PM Find Quote Report
WDZ
Former Admin
*****

Avatar

Posts: 7106
Reputation: 107
– / Male / Flag
Joined: Mar 2002
RE: Request: A translation program for website translation
quote:
Originally posted by sock
As for the META HTTP-EQUIV tag, I could very possibly be wrong about what I said - but one thing's for sure, it does not override the server's header information. How do I know? The exact same HTML code (a Hebrew page with the above META tag included) was displayed fine (ie. in Hebrew) on one server, while on the other it wasn't.
Yep... I think it's time for a w3.org quote. :p

quote:
http://www.w3.org/TR/REC-html40/charset.html#h-5.2.2
...conforming user agents must observe the following priorities when determining a document's character encoding (from highest priority to lowest):

- An HTTP "charset" parameter in a "Content-Type" field.
- A META declaration with "http-equiv" set to "Content-Type" and a value set for "charset".
- The charset attribute set on an element that designates an external resource.

This post was edited on 06-15-2004 at 08:38 AM by WDZ.
06-15-2004 08:37 AM
Profile PM Web Find Quote Report
Pages: (3): « First « 1 2 [ 3 ] Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On