Re: New class in PEAR: Translation
| From: | Markus Wolff | Date: | Tue, 01 Oct 2002 11:30:44 +0000 |
| Subject: | Re: New class in PEAR: Translation | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-9740@lists.php.net to get a copy of this message | ||
Am Tue, 1 Oct 2002 13:18:20 +0200 schrieb "Lukas Smith" <smith@dybnet.de>:
> > This is a drop-dead-simple method of translation that is not only easy
> > to use but also easy to maintain even with tools like phpMyAdmin. If
> > someone here knows a class that already does this or something very
> > similar, please drop me a line. If not, I´ll have to write this myself
> > as I need something like this and have no use for page-oriented
> > translation.
>
> well i would not use a text string as your "base".
> What if you decide to change the english text for one of your clients?
> Maybe the client is addressing a younger audience so the text should be
> less formal etc.
>
> The base should be something more abstract like "mail_error" and also it
> would make sense to group the texts into something like general and
> modul specific. So you can say $t->get('mail_error', 'contact');
> ommitting 'contact' would mean you want the general translation.
Congratulations, you´ve just come up with a fourth possible approach :-)
I´m sure there will be even more if enough people think about it long
enough.
Your approach is exactly what I don´t want because my code will be
harder to read, having lots of abbreviations for text that is stored
only in a database. I´d have to know all abbreviations to know what is
the exact output. Also, when still in the development phase of a new
application, I can simply test some new output very fast without having
to add the needed strings to the database first.
However, this is a behaviour that could be easily configured through
such a class as the database model can be almost the same for both
approaches.
Regards,
Markus
--
*21st Media* | Consulting, Konzeption, Produktion für die Bereiche:
Markus Wolff | Internet, Intranet, eCommerce, Content Management,
Hamburg,Germany | Softwareentwicklung, 3D-Animation, Videostreaming
http://21st.de | Tel. [+49](0)40/6887949-0, Fax: [+49](0)40/6887949-1