[Kolab-devel] 3 commits - lib/kolab_api_controller.php lib/kolab_client_task.php public_html/js
Aleksander Machniak
machniak at kolabsys.com
Thu Feb 23 14:07:46 CET 2012
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.
--
Aleksander 'A.L.E.C' Machniak
LAN Management System Developer [http://lms.org.pl]
Roundcube Webmail Developer [http://roundcube.net]
---------------------------------------------------
PGP: 19359DC1 @@ GG: 2275252 @@ WWW: http://alec.pl
More information about the devel
mailing list