Re: Re: other languages
| From: | Bertrand Mansion | Date: | Mon, 01 Aug 2005 14:52:58 +0000 |
| Subject: | Re: Re: other languages | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-39088@lists.php.net to get a copy of this message | ||
Pierre-Alain Joye wrote:
>On Mon, 01 Aug 2005 14:45:31 +0200
>lsmith@php.net (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).
>
>Error codes sound good (textual or numeric). I do not see a point
>to allow localized errors. Except 4d (which translates its langage
>too), I do not know any other with such custom errors.
What about Windows, Linux, MacOSX, etc. ? These OS support localized error
strings. It's a good practice IMO. The point is whether to let it up to the user
or have this handled by PEAR and more specifically PEAR_Error/PEAR_Exception, or
maybe just provide the interface to plug a self-made translator based on error
codes if the feature is needed.
Bertrand Mansion
Mamasam