On Tue, 26 Nov 2002, Wez Furlong wrote:

>If I wanted localized error messages, then this would be the way to do
>it.  Perhaps merging this with the php_error_docref might be slightly
>better.
>
>However, I'm personally -1000 on such things; there are many reasons,
>most of them have already been raised here, so I won't repeat them now,
>but the main issue is with the maintainability of such a thing;
>localization is very hard to maintain on a volunteer basis (just look at
>our manual).
>
>For something as important as error messages, it is better to have the
>"definitive" error message in english and then take advantage of the
>hyperlink generated by php_error_docref which will display more detailed
>information in the localized manual.

    +<insert very big number here> for this. It's already there, so
    let's use it and forget this nonsense of adding some extra work
    for developers.
    
    --Jani
    


>--Wez.
>
>On Tue, 26 Nov 2002, Sascha Schumann wrote:
>
>>     A possible implementation would look like this:
>>
>>     A new ini setting is added.
>>
>>         php.error_lang
>>
>>     A new function is provided.
>>
>>         php_error_ex(int type, const char *err_code, const char *fmt, ...);
>>
>>     The function tries to lookup the <err_code> key in
>>     php-<php.error_lang>.cat.  If it exists, the value will be
>>     used instead of the format <fmt>.  The control is then passed
>>     to php_verror().
>>
>>     That sounds like 30-50 additional LOC to me.  No bloat in
>>     sight.
>>
>>     The program which generates the .cat files (gen-cat) will
>>     ensure that the error code is prepended to the format
>>     message.  That could be a simple C file with another 50 LOC,
>>     parsing input files of the form
>>
>>         file: file line | line
>>         line: ERROR-CODE MSG
>>
>>     Each extension can maintain its own file (e.g. cat.session.nl for
>>     the NL version of the session error messages).  During
>>     .cat build-time, a single per-language file is generated and
>>     fed through gen-cat.  The result can then be used by PHP.
>>
>>     There, simple and straight-forward.
>>
>>     - Sascha
>>
>> --
>> PHP Development Mailing List <http://www.php.net/>
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>
>
>

-- 
<- For Sale! ->


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to