[Phpmyadmin-devel] phpMyAdmin with gettext

Michal Čihař michal at cihar.com
Mon Mar 15 11:30:58 CET 2010


Hi

Dne Sun, 14 Mar 2010 21:12:05 +0100
Michael Keck <sfnet at michaelkeck.de> napsal(a):

> Okay ...
> perhabs with templating I must do this if we don't want use the
> $strNameWhatElseEver in future releases.

Anyway there should be (yet another) abstraction layer, so using
something like $strFoo in templates can actually make sense. Simply we
need to control texts ourself and give theme designers only control
around the interface. The more I'm thinking about this the more I think
that XSLT transformation might better for this than template system.

We would simply generate XML describing the interface and the XSLT will
transform that into HTML sent to user (for example I know that CDash is
using this approach).

> > But we can definitely create such code.
> > Django has something what provides gettext like functionality to
> > javascript, but I don't know if the code is enough generic so that it
> > can be used in other project.
> >   
> Django is python or I'm wrong?

Yes it's Python :-). I'm just using it as example because I'm currently
writing our internal tool in it and I know quite well how it works.

> >> The Problem: UTF8-Strings should be encoded with \uXXXX.
> >> Sample: 'Löschen' will become 'L\u00F6schen'.
> >>     
> > There is some problem in using http headers for defining charset for
> > javascript?
> >   
> Yes, browser can ignore charset (by wrong encoding settings). 

Well in this case also text in pages will be wrong and we can not do
much about that. I would simply ignore this scenario (no that
automatically convert generated strings would be problem).

> This is a
> bulletproof solution.
> Many big JS-projects (like TinyMCE or jQuery) use the \uXXXX, cause only
> displayed text will
> be damaged, not the functional of a script.

As our intention is still to make the phpMyAdmin work without
javascript it's not that big problem.

-- 
	Michal Čihař | http://cihar.com | http://blog.cihar.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20100315/0d7a3087/attachment.sig>


More information about the Developers mailing list