Hi Matt,
The initial version of the internationalisation code is posted to Mantis:
http://www.vicidial.org/VICIDIALmantis/view.php?id=240
The following files for agent interface were modified for internationalisation:
vicidial.php
vdc_db_query.php
timeclock.php
conf_exten_check.php
I also modified the welcome.php file in the vicidial folder.
I did not update astguiclient.php, because I understand that it is not used so frequently now.
I did not touch the debugging and warning messages, only the messages that are displayed to user are encapsulated by gettext. As a general rule all messages exchanged internally between scripts or written to database were left unchanged.
The localization of the interface is configured in the new localization.php file included by the internationalised files. For the moment the default locale is switched by modifying the locale variable.
I would recommend to have the default locale and the available locales stored in the system or server settings table of the database, but this is not implemented yet. I have not implemented run-time switching of interface language from the web interface either, but it would be quite easy to implement as a drop-down in the login screen. I would be waiting for suggestions on these points, before going ahead with the implementation.
I did not change the logic of the code, except for one instance where I have identified a bug. Line 9336 of vicidial.php which was:
if (eregi("X",dial_prefix))
was changed as:
if (eregi("X",dial_prefix))
(The notification message must not be shown when the dialing prefix is disabled.)
The code is based on the trunk version (2.2 rev 1240). I could update the code to match rev 1244 that was published recently or a later version after receiving some feedback.
Matt, would you consider to commit the internationalization changes to trunk? Do you have any suggestions on how I can proceed?