Hi all,
after investigating character sets & languages for quite a while now, and writing a correct implentation of a language system for my phpDNS project, i wanted to propose adding the same system to phpMyAdmin.
Features: - Can detect user language and character set from browser, incl regional variants - supports HTTP/1.1 language/charset q-values. - automatically sets correct fonts. - can figure out the most likely language to use if the exact language support is not available. EG if 'fr-ca' is supported (not plain 'fr'), but the user requests 'fr-ch', they will get 'fr-ca' since it's the closest to 'fr-ch' that is available. - all language data stored in a database, for easy updating - able to include mroe than one language, eg load 'fr' and then 'fr-ca' on top of that to redefine only some tags. - supports multiple character sets per language - call to get a string is i18n("String_Name")
Implementation: - database uses a single table, and stores data in a tree structure inside the table. - OpTree is the wrapper class for handling the table. - (I also use it to store most of the configuration options for the program) - On login, all the language data for your selected language is stored in a session file, to avoid repeated database access.
Known caveats: - don't know if sessions are supported on non-UNIX platforms I think sessions are supported on NT, but not sure beyond that - database overhead on first loadup actualy gets called twice, once for the login page, and once for the rest of the system - size of session files possibly I should reduce the session file lifetime? (can anybody suggest any more?)
see the main phpDNS active working tree at http://phpdns-local.orbis-terrarum.net/phpDNS/userspace/ - login: test - password: test
see the OpTree testing/modication backend http://phpdns-local.orbis-terrarum.net/phpDNS/learning/options/optree.php - click on 'view tree' to a get a quick dump of the page
Hello Robin & you all,
Short answer (sorry, quite busy on other stuff currently), with my opinion.
On Thu, May 17, 2001 at 11:48:17PM -0700, Robin Johnson wrote:
after investigating character sets & languages for quite a while now, and writing a correct implentation of a language system for my phpDNS project, i wanted to propose adding the same system to phpMyAdmin. [...]
All this sounds quite good. The only think I not really find good is the need of a database for the strings : phpMyAdmin is mainly used and installed by "php&mysql newbies", and if we ask them to install and configure a table just to be able to use phpMyAdmin, I'm pretty sure there will be lots of posts in the help forums... :)
Features:
- Can detect user language and character set from browser, incl regional variants
it's already the case (added by myself, and then completed by loic)
- supports HTTP/1.1 language/charset q-values.
what's that ? : the Content-Type: text/html; charset=xxxxx stuff ?
- automatically sets correct fonts.
would be nice, right.
- can figure out the most likely language to use if the exact language
support is not available.
ok, easy thing :)
- all language data stored in a database, for easy updating
maybe practical, but not new-user-friendly, and one textfile per language, plus a entry in the language-list is not so bad I think (IMHO of course :).
- able to include mroe than one language, eg load 'fr' and then 'fr-ca' on top of that to redefine only some tags.
let the translator work :)
Known caveats:
- don't know if sessions are supported on non-UNIX platforms I think sessions are supported on NT, but not sure beyond that
phpMyAdmin is still php3-based, so no sessions yet.
- size of session files possibly I should reduce the session file lifetime?
could be done in php.ini: session.cache_expire / session.cookier_lifetime, etc.
see the main phpDNS active working tree at http://phpdns-local.orbis-terrarum.net/phpDNS/userspace/
- login: test
- password: test
mmm, after login, I only see blank white screen (netscape under windows), under opera there are some more things, but lots of 404. Will try again later...
Voila, these were just 100% personal comments: let's see what the others think :)
Regards & nice week-end to you, Olivier
Oups, I've made a mistake this morning: I've posted this message to the mailbox of Robin instead of sending it to the mailing-list...
---- Hi Robin!
Nice work you've done :)
BTW I've got some remarks:
- automatically sets correct fonts.
Have you take into account languages that do not have yet an official ISO/IANA code and for witch charset would be 'x-user-define'. It's important also because NS4 do not like very much non-european charsets: for example, to see Thai characters with this browser you have to use a 'personnal charset' with a specific font associated to it.
- can figure out the most likely language to use if the exact language
support is not available. EG if 'fr-ca' is supported (not plain 'fr'), but the user requests 'fr-ch', they will get 'fr-ca' since it's the closest to 'fr-ch' that is available.
Well I'm not sure 'plain fr' is not closest to 'fr-ca' than 'fr-ch', even if differences are not so important. But there is an other major problem: I've been told (by phpMyChat translators) that, for example, Chinese simplified (zh) has nothing to do with Chinese traditionnal (zh-tw). Then if one of these translations is lacking, the user should use the default language rather than the closest one according to the ISO code.
- don't know if sessions are supported on non-UNIX platforms
I think sessions are supported on NT, but not sure beyond that
Session are supported on all the OS as far as I know.... as soon as 'register_globals' is set to 'on'. PHP is awfully buggy since release 4.01 else (there are many bug reports about this at the official php bug database, but no fix :(). Moreover they aren't supported by php3... I'm afraid these are true and really annoying problems.
Lastly, we should need an other variable to define the cell alignement in tables according to the language direction. Only my 2 cts, of course ;)
Regards, Loïc
______________________________________________________________________________ ifrance.com, l'email gratuit le plus complet de l'Internet ! vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP... http://www.ifrance.com/_reloc/email.emailif
On Fri, 18 May 2001, [iso-8859-1] Lo�c wrote:
Oups, I've made a mistake this morning: I've posted this message to the mailbox of Robin instead of sending it to the mailing-list...
NP.
- automatically sets correct fonts.
Have you take into account languages that do not have yet an official ISO/IANA code and for witch charset would be 'x-user-define'. It's important also because NS4 do not like very much non-european charsets: for example, to see Thai characters with this browser you have to use a 'personnal charset' with a specific font associated to it.
hmm, I suppose some diehards out there would want to implement x-klingon or i-georgian.
So i'll add support for that.
- can figure out the most likely language to use if the exact language
support is not available. EG if 'fr-ca' is supported (not plain 'fr'), but the user requests 'fr-ch', they will get 'fr-ca' since it's the closest to 'fr-ch' that is available.
Well I'm not sure 'plain fr' is not closest to 'fr-ca' than 'fr-ch', even if differences are not so important. But there is an other major problem: I've been told (by phpMyChat translators) that, for example, Chinese simplified (zh) has nothing to do with Chinese traditionnal (zh-tw). Then if one of these translations is lacking, the user should use the default language rather than the closest one according to the ISO code.
Hmm, ok, thats a good point. I suppose that for some languages this would be a major problem, so i'll turn it off in my code for now.
- don't know if sessions are supported on non-UNIX platforms
I think sessions are supported on NT, but not sure beyond that
Session are supported on all the OS as far as I know.... as soon as 'register_globals' is set to 'on'. PHP is awfully buggy since release 4.01 else (there are many bug reports about this at the official php bug database, but no fix :().
Ok, after a little testing, I have seen that getting sessions to work on NT can be a bit of a pain in the posterior. I have had some major problems with PHP builds before as well, and it still segfaults on a certain page of mine for absolutely no reason I can find, and If i restart my apache, the problem goes away for a while even.
Moreover they aren't supported by php3...
That could be a major problem.
Lastly, we should need an other variable to define the cell alignement in tables according to the language direction.
Hmm, that one would be worth adding, for the sake of the Hebrew and Japanese users out there at least.
Hi
I have seen that getting sessions to work on NT can be a bit of a pain in
the posterior.<<
I have Win2000(NT5) PHP4.04 and IIS5 on my machine and I've never had any real problems with sessions, I did have one minor problem where you can sometimes loose session variables if you use redirection headers.
Pete
----- Original Message ----- From: "Robin Johnson" robbat2@fermi.orbis-terrarum.net To: phpmyadmin-devel@lists.sourceforge.net Sent: Friday, May 18, 2001 5:11 PM Subject: Re: [Phpmyadmin-devel] Re: MAJOR suggestion
On Fri, 18 May 2001, [iso-8859-1] Loïc wrote:
Oups, I've made a mistake this morning: I've posted this message to the mailbox of Robin instead of sending it to the mailing-list...
NP.
- automatically sets correct fonts.
Have you take into account languages that do not have yet an official ISO/IANA code and for witch charset would be 'x-user-define'. It's important also because NS4 do not like very much non-european charsets: for example, to see Thai characters with this browser you have to use a 'personnal charset' with a specific font associated to it.
hmm, I suppose some diehards out there would want to implement x-klingon or i-georgian.
So i'll add support for that.
- can figure out the most likely language to use if the exact language
support is not available. EG if 'fr-ca' is supported (not plain 'fr'), but the user requests 'fr-ch', they will get 'fr-ca' since it's the closest to 'fr-ch' that is
available.
Well I'm not sure 'plain fr' is not closest to 'fr-ca' than 'fr-ch', even if differences are not so important. But there is an other major problem: I've been told (by phpMyChat translators) that, for example, Chinese simplified (zh) has nothing to do with Chinese traditionnal (zh-tw). Then if one of these translations is lacking, the user should use the default language rather than the closest one according to the ISO code.
Hmm, ok, thats a good point. I suppose that for some languages this would be a major problem, so i'll turn it off in my code for now.
- don't know if sessions are supported on non-UNIX platforms
I think sessions are supported on NT, but not sure beyond that
Session are supported on all the OS as far as I know.... as soon as 'register_globals' is set to 'on'. PHP is awfully buggy since release 4.01 else (there are many bug reports about this at the official php bug database, but no fix :().
Ok, after a little testing, I have seen that getting sessions to work on NT can be a bit of a pain in the posterior. I have had some major problems with PHP builds before as well, and it still segfaults on a certain page of mine for absolutely no reason I can find, and If i restart my apache, the problem goes away for a while even.
Moreover they aren't supported by php3...
That could be a major problem.
Lastly, we should need an other variable to define the cell alignement in tables according to the language direction.
Hmm, that one would be worth adding, for the sake of the Hebrew and Japanese users out there at least.
-- --- Robin Hugh Johnson "Robbat2" QTOD: "I used to be an idealist, but I got mugged by reality." E-Mail : robbat2@orbis-terrarum.net ICQ# : 30269588 or 41961639 Home Page : http://www.orbis-terrarum.net Time Zone : Pacific Daylight (GMT - 8) -----GEEK CODE-{--- Version: 3.12 Serial: 2001041400 GU/CS d- a--- C++++ L++++ U*+++ E---- e* h! tv-- X+ W+++ N+++ w--- M P+ R O- D++ V-- PS+ PE-- Y+ PGP++ r !y t-- 5 s+:- b+++ ---}-GEEK CODE----- -----PGP INFO-{--- Key ID:0x7E20DFA1 FingerPrint: 5447C73A 30FB144C 89521B69 2D6A615E 7E20DFA1 ---}-PGP INFO-----
_______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel