Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-11

Web site now translatable

16 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Daniël Mantione

Hello,

Over the weekend we have started to use a new website build tool. The main improvement is support for a multi-lingual website.

The website will still be static HTML; content negotiation is used to display the user a page in his own language.

If you would like to make the FPC website available in your own language, get yourself translation permissions on the Community. Then, in the translation manager, enable translator mode. Then browse to a special dynamic version of the website located at
http://community.freepascal.org:10000/website. Click on the read bullets you see to translate things.

We'll download the translated message key regularily and update the static website from it.

Currently all message keys necessary to translate the main page have been created. I'll continue to add more of them, but it'll take a while before the entire website has been added.

Greetings,

Daniël Mantione

Пётр Косаревский
If you would like to make the FPC website available in your own language,

What encoding does it need? UTF8, UTF16, language specific (for example, five are supported by Opera for cyrillic text, windows-1251 is the most common).

I can translate from English into Russian (I can bet I'm not the only one).

Daniël Mantione
to Пётр Косаревский

Op Tue, 21 Nov 2006, schreef ???? ???????????:

Show quoted text 5 lines
> If you would like to make the FPC website available in your own language, What encoding does it need? UTF8, UTF16, language specific (for example, five are supported by Opera for cyrillic text, windows-1251 is the most common).

Whatever you prefer. The database uses UTF-8, but I can configure the website generator to generate any encoding.

Daniël

Пётр Косаревский
> > If you would like to make the FPC website available in your own language,

Is there a magic button to see the actual page with the text (some words are not very easy to translate without context, and width can be important sometimes, sometimes it's not that obvious to guess the right page)?

Daniël Mantione
to Пётр Косаревский

Op Tue, 21 Nov 2006, schreef ???? ???????????:

Show quoted text 6 lines
> > > If you would like to make the FPC website available in your own language, Is there a magic button to see the actual page with the text (some words are not very easy to translate without context, and width can be important sometimes, sometimes it's not that obvious to guess the right page)?

You can click on "show files that use this message key". It isn't everything, but the file name should tell you something about the URL a message key is used on.

Alternatively, enable translator mode and simply browse to the page you would like to translate, then you will see everything in context.

Daniël

Tomas Hajny
to Daniël Mantione: Op Tue, 21 Nov 2006, schreef ???? ???????????: Whatever you prefer. The database uses…
Daniël Mantione wrote 11 lines
Op Tue, 21 Nov 2006, schreef ???? ???????????: > > If you would like to make the FPC website available in your own > language, > > What encoding does it need? UTF8, UTF16, language specific (for > example, five are supported by Opera for cyrillic text, windows-1251 is > the most common). Whatever you prefer. The database uses UTF-8, but I can configure the website generator to generate any encoding.

Well, preferably the WWW server should accept the charset configured in the browser...

Tomas

Michael Van Canneyt
to Tomas Hajny
Tomas Hajny wrote 15 lines
Daniël Mantione wrote: > Op Tue, 21 Nov 2006, schreef ???? ???????????: > >> > If you would like to make the FPC website available in your own >> language, >> >> What encoding does it need? UTF8, UTF16, language specific (for >> example, five are supported by Opera for cyrillic text, windows-1251 is >> the most common). > > Whatever you prefer. The database uses UTF-8, but I can configure the > website generator to generate any encoding. Well, preferably the WWW server should accept the charset configured in the browser...

Nooooo,
the browser should detect the charset sent by the server, and display it correctly :-)

If the client can do it, let the client do it. Golden rule for writing robust servers.

Michael.

Daniël Mantione
to Michael Van Canneyt

Op Tue, 21 Nov 2006, schreef Michael Van Canneyt:

Show quoted text 19 lines
On Tue, 21 Nov 2006, Tomas Hajny wrote: > Daniël Mantione wrote: > > Op Tue, 21 Nov 2006, schreef ???? ???????????: > > > >> > If you would like to make the FPC website available in your own > >> language, > >> > >> What encoding does it need? UTF8, UTF16, language specific (for > >> example, five are supported by Opera for cyrillic text, windows-1251 is > >> the most common). > > > > Whatever you prefer. The database uses UTF-8, but I can configure the > > website generator to generate any encoding. > > Well, preferably the WWW server should accept the charset configured in > the browser...

If you want we can generate the pages in multiple encodings and use the same content negotitiation we use for the language to serve it in the right encoding.

Show quoted text 6 lines
Nooooo, the browser should detect the charset sent by the server, and display it correctly :-) If the client can do it, let the client do it. Golden rule for writing robust servers.

Well, you can make good use of this facility. Imagine a Russian using a system that cannot display Cyrillic. Such system could still request a page in Russian, but also community that it doesn't accept Cyrillic. The web server can then send a Roman transliteration of the page.

However, in practise I think we would be solving a problem that doesn't exist, so no disagreement here.

Daniël

Пётр Косаревский
Show quoted text 10 lines
> Op Tue, 21 Nov 2006, schreef ???? ???????????: <-- it's me >> > If you would like to make the FPC website available in your own >> language, >> What encoding does it need? UTF8, UTF16, language specific (for >> example, five are supported by Opera for cyrillic text, windows-1251 is >> the most common). > Whatever you prefer. The database uses UTF-8, but I can configure the > website generator to generate any encoding. Well, preferably the WWW server should accept the charset configured in the browser...

and

Nooooo, the browser should detect the charset sent by the server, and display it correctly If the client can do it, let the client do it. Golden rule for writing robust servers.

I asked about encoding, because it is possible to enter text in incorrect encoding into "translator" (i.e.: "translator" supposes the text to be in windows-1251 and I enter text in ISO-8859-5 [for cyrillic text]).

It looks like this problem does not arise if I type text in browser (Opera 9).

WWW server may honour Accept-Charset HTTP request header, and it should be easy to translate text on server with known charset to another one, so any desire for accessibility (which is present, as I see, because otherwise the whole translation thing would not appear at all) leads to implementing this honour-thing.

And client may have some problems displaying characters correctly (I don't think that it's possible to write 100%-hit encoding recognition) if the charset is not specified in the <meta http-equiv="content-type" ... charset="" > (well, if I get it right, it may be one step, not two, in the FPC website case; and as the webpages are static, there have to be copies with all the desired encodings).

Anyway, it seems, that the website already deals with these things good enough. Most modern browsers do already support plenty of encodings.

I didn't write anything ingenious, but if I'm wrong somewhere, please point at it.

Tomas Hajny
to Пётр Косаревский
đŁÔŇ ëĎÓÁŇĹ×ÓËÉĘ wrote 21 lines
> > Op Tue, 21 Nov 2006, schreef ???? ???????????: <-- it's me > >> > If you would like to make the FPC website available in your own > >> language, > >> What encoding does it need? UTF8, UTF16, language specific (for > >> example, five are supported by Opera for cyrillic text, windows-1251 > is > >> the most common). > > Whatever you prefer. The database uses UTF-8, but I can configure the > > website generator to generate any encoding. > Well, preferably the WWW server should accept the charset configured in > the browser... and > Nooooo, > the browser should detect the charset sent by the server, and display it > correctly > If the client can do it, let the client do it. Golden rule for writing > robust servers. I asked about encoding, because it is possible to enter text in incorrect encoding into "translator" (i.e.: "translator" supposes the text to be in windows-1251 and I enter text in ISO-8859-5 [for cyrillic text]).

.
.

That was the point (submitting text rather than displaying it), indeed. However, Michael's suggestion still applies perfectly - you can't really guess well on the client side what encoding is expected by the server. ;-)

Tomas

Daniël Mantione
to Tomas Hajny

Op Tue, 21 Nov 2006, schreef Tomas Hajny:

Show quoted text 26 lines
??Ô? ë?ÓÁ??×ÓËÉ? wrote: >> > Op Tue, 21 Nov 2006, schreef ???? ???????????: <-- it's me >> >> > If you would like to make the FPC website available in your own >> >> language, >> >> What encoding does it need? UTF8, UTF16, language specific (for >> >> example, five are supported by Opera for cyrillic text, windows-1251 >> is >> >> the most common). >> > Whatever you prefer. The database uses UTF-8, but I can configure the >> > website generator to generate any encoding. >> Well, preferably the WWW server should accept the charset configured in >> the browser... > and >> Nooooo, >> the browser should detect the charset sent by the server, and display it >> correctly >> If the client can do it, let the client do it. Golden rule for writing >> robust servers. > > I asked about encoding, because it is possible to enter text in incorrect > encoding into "translator" (i.e.: "translator" supposes the text to be in > windows-1251 and I enter text in ISO-8859-5 [for cyrillic text]). . That was the point (submitting text rather than displaying it), indeed. However, Michael's suggestion still applies perfectly - you can't really guess well on the client side what encoding is expected by the server. ;-)

Well, I don't know exactly what happens under the hood, but it works, so I'm not going to research it. If I need to guess, my guess is that the web server that takes cares of it. If I remember well openacs requires some character set support patches for old versions of aolserver.

Daniël

Пётр Косаревский
Show quoted text 6 lines
> What is the easiest way to browse translatable site, if possible? > > The links point to the main site, and I didn't succeed in browsing http://www.freepascal.org/download.var analogue (I tried to add "download.var" to the http://community... link a few ways). Just remove the extension, so the URL is http://community.freepascal.org:10000/website/download Daniel

Thanks, after few tries it's ok (it usually lost red stars on yellow before).

Daniël Mantione
to Пётр Косаревский

Op Fri, 24 Nov 2006, schreef ???? ???????????:

Show quoted text 8 lines
> > What is the easiest way to browse translatable site, if possible? > > > > The links point to the main site, and I didn't succeed in browsing http://www.freepascal.org/download.var analogue (I tried to add "download.var" to the http://community... link a few ways). > Just remove the extension, so the URL is > http://community.freepascal.org:10000/website/download > Daniel Thanks, after few tries it's ok (it usually lost red stars on yellow before).

? What do you mean with lost?

Anyway, there are a few child diseases in a few pages. I'll fix them during the next days. (But first I need to get back home, I'm out of the country currently.)

Daniel

Пётр Косаревский
Show quoted text 5 lines
? What do you mean with lost? Anyway, there are a few child diseases in a few pages. I'll fix them during the next days. (But first I need to get back home, I'm out of the country currently.) Daniel

Nothing really terrible: somehow I repeatedly lost "translator on" status, so I thought, that I guessed address incorrectly.

Child diseases bring me confidence in translation (it's not my profession, so it's easier for me to translate weaker styled sentences, than brilliant ones, and so my output increases).

Translation engine is a really great work! (And it's listed neither in the credits, nor in the authors pages.)