Re: other languages
| From: | Alan Knowles | Date: | Tue, 02 Aug 2005 00:07:22 +0000 |
| Subject: | Re: other languages | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-39114@lists.php.net to get a copy of this message | ||
I doubt many of the error messages coming from PEAR packages are really
intended for end users to view (and hence really need translation..)
"Database connection failed" -> Sorry technical problem with our site,
please return later..
"Error in SQL..." -> Sorry technical problem with our site, please
return later..
"File XXX could not be opened" -> Sorry technical problem with our site,
please return later..
... get the gist....
I dont normally use pear errors in the last layer to deliver messages to
the end user, error flags etc. tend to be more relivant..
Regards
Alan
On Mon, 2005-08-01 at 14:45 +0200, Lukas Smith wrote:
> Hi,
>
> Quite sensibly PEAR uses english as its base language. However here
> (http://www.pear-forum.de/viewtopic.php?p=2464#2464) is a post on a
> german forum that raises an interesting and important issue: PEAR
> provides no proper way for developer to display error, status and other
> messages in a translated form.
>
> I raised this on IRC and one solution that was proposed was gettext.
> However gettext is painful in alot of ways. Most importantly messages
> will likely get minor modifications and using gettext this would become
> a BC break.
>
> The best solution IMHO is using error, status etc codes. Especially for
> error codes this means once again extending from PEAR_Error (otherwise
> it would be impossible to determine what error code map to use for a
> given error object).
>
> Another thing that would need to happen is to make it easier for the
> user to provide a code to text mapping and then have the classes
> transparently use that instead. While all of my packages try to make use
> of codes I dont have anything in place for that. As a matter of fact I
> usually statically define the mapping inside a method.
>
> I dont think we need to start making this stuff a requirement, but it
> might be sensible to ponder about the issue and come up with a somewhat
> standard recommended approach in PEAR.
>
> regards,
> Lukas
>