php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22644 language specific content-encoding
Submitted: 2003-03-11 20:17 UTC Modified: 2003-08-07 13:27 UTC
From: ulysses at mail dot fitan dot com dot tw Assigned:
Status: Closed Package: Website problem
PHP Version: 4.3.1 OS: MacOS
Private report: No CVE-ID: None
 [2003-03-11 20:17 UTC] ulysses at mail dot fitan dot com dot tw
php.net now recept ACCEPT_LANG parameter and display 
specified language keywords. That's a nice feature. But you 
also specified all font-family in style.css as Verdana. 
That's not good. Verdana is a font with Western language 
character set. If you do not specify content-type=text/html 
with charset setting to correct character set (big5, 
gb2312, shift-jis...), users who use Chinese (zh, zh-TW) or 
Japaness (ja) as the top of accept-languages will not be 
able to view the contents with some browsers. Please add 
charset, or please use language-specified CSS file.

BTW, I'm reporting PHP.net website problem, this bug 
reporting should not ask me for PHP version.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-12 02:24 UTC] goba@php.net
The CSS file and the accept language setting is not connected. You said it's a nice feature to have the accept language honored, so you don't have a problem with it. So I renamed the bug :)

We do print out language specific Content-Type headers.
See http://www.php.net/source.php?url=/include/shared-manual.inc for yourself (look for the sendManualHeaders function). I can check this by visiting http://php.net/zh/echo (which is the Chinese echo page), and I got a notice that I don't have that charset installed.

We do have a problem with the CSS files, which does seem to be overriden by browsers, as different charsets require different fonts...

You asked us to specify the charset *or* langauge dependent CSS files. We do the first. Then what is the problem?
 [2003-03-12 05:37 UTC] ulysses at mail dot fitan dot com dot tw
Well, my browser now have no trouble rendering www.php.net/
zh/
echo . But it's still hard to read. Chinese font must be 
larger so that 
user will not complain. I know this cause I'm dealing with 
critical users  
just like me everyday. And that's why you can hardly find 
any elegent 
Chinese website.

I've build several multi-language website too. And I found 
that the 
only way to make both English and Chinese language version 
look 
good, is to build two website with different layout 
template. It's 
almost impossible to use one style for two different 
language. 

Now when I'm designing pages with CSS, I would avoid set 
specified 
font name as font-family. I will use "serif", "sans-serif", 
"monospace" 
and "cursive" instead; so that it can be modified for other 
language 
easily. Sometimes I will use PHP to generate CSS files ( 
href=
'stylesheet.php' ) and Javascript files to deal with these 
browser 
trouble. 

Another greate solution to this problem is to set cookie 
and let user 
choose their preferred language. Like Google. 

BTW, I've tried 'jp' in accept-language sets; most content 
are 
translated into Japanese. But there are only a few keywords 
(like 
'example', 'warning' and some subtitle) are translated into 
Chinese...
 [2003-08-07 13:27 UTC] goba@php.net
We let users to define their preferred language now, and have content-encoding headers, and always had relative font sizes, measured to your browser defaults. Every browser supports zooming to some respect... So there is no problem left here...
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Mon Jun 15 07:00:01 2026 UTC