[Kolab-devel] 3 commits - lib/kolab_api_controller.php lib/kolab_client_task.php public_html/js

Jeroen van Meeuwen (Kolab Systems) vanmeeuwen at kolabsys.com
Thu Feb 23 14:27:11 CET 2012


On 2012-02-23 13:07, Aleksander Machniak wrote:
> On 23.02.2012 13:53, Jeroen van Meeuwen (Kolab Systems) wrote:
>
>> Please allow me, maybe I'm not understanding what you are trying to
>> achieve here;
>>
>> I'm wondering what the purpose is for the language to be saved in 
>> the
>> $_SESSION on the API backend.
>>
>> Isn't it simpler/better/easier to have the API backend return the
>> messages (in en_US.utf-8), with error code, and provide the client 
>> with
>> the means to translate those messages?
>
> There are a few reasons to translate on the backend side:
> 1. API is sometimes called directly from the browser (AJAX) where
> translation is not loaded. This was a main reason to do it this way.
> - Don't need to sent a whole error-to-message translation table into 
> the
> browser.
> 2. User language defines also collation (sorting) behaviour.
> 3. Translation files can be split into two parts.

Sounds fair enough. Thanks for the clarification.

Kind regards,

Jeroen van Meeuwen

-- 
Systems Architect, Kolab Systems AG

e: vanmeeuwen at kolabsys.com
m: +44 74 2516 3817
w: http://www.kolabsys.com

pgp: 9342 BF08




More information about the devel mailing list