Re: [Tuxpaint-i18n] website
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
From: Pere P. i C. <pe...@fo...> - 2008-11-27 22:25:12
|
El dg 23 de 11 de 2008 a les 23:29 +0100, en/na Karl Ove Hufthammer va escriure: > I've now translated the main page to Norwegian Nynorsk, but there are some > encoding problems. When I visit http://tuxpaint.org/ I get the translated > content, and the HTML file is in UTF-8, but the HTML file contains > > <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> > > and the HTTP header says > > Content-Type: text/html; charset=iso-8859-1 > > So the browser naturally displays the page as ISO 8859-1, and all non-ASCII > characters are incorrectly displayed. > > If I instead visit > > http://tuxpaint.org/?lang=nn_NO > > the HTML file is still in UTF-8, but also still contains > > <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> > > This would lead the page to be incorrectly displayed, but the HTTP header now > says > > Content-Type: text/html; charset=UTF-8 > > which overrides the character encoding declaration on the Web page, so that it > is correctly displayed (in Firefox). Other browser may well ignore the HTTP > header, as servers are often misconfigured. > > Anyway, both the HTML file and the HTTP header *must* declare the correct > encoding, i.e., UTF-8. > The only way I've reached to set the right values in the created html files from my local copy served via a misconfigured(*) apache2 is putting $HTTP_ACCEPT_LANGUAGE = getenv('HTTP_ACCEPT_LANGUAGE'); at the beginning of layout/std.php3 and if ($accept=="ca") { $accept="ca_ES"; } after the translation from no to nn I'm not sure if this will work on the tuxpaint.org webserver (*) I have to call index.php3 directly, and even if I am able to get the right language in this line <html lang="ca_ES"> and the right encoding <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> I am unable to get the main page translated, I've only get translated when I append ?lang==ca_ES to the address. Hope this helps Pere |