Multi-language editing
CiviCRM: Multi-language Support
Written by Piotr Szotkowski   

The last part of my Summer of Code project was multi-langage editing of the internationalised fields. The aim of this task was to be able to edit all language versions of a given field (say, a given contact’s first name) in a centralised place.

After some initial head-scratching I decided the most useful way of implementing this would be to add a small icon next to the internationalised fields in their respective editing screens; once the user clicks this icon, a small dialog with this field’s values in all the enabled languages would pop-up and the user would be albe to adjust this field’s value in all the languages on one go.

After struggling a bit with various issues, this feature is implemented using the Dojo toolkit’s Dialog widget; as I didn’t want to submit the ‘underlying’ form (nor reload it after the user edits the multi-language field), the small dialog form is submitted with Ajax, this time using Dojo’s xhrPost.

All of these were my first times with JavaScript, Ajax and Firebug-powered script debugging, and I’m must say I’m quite impressed with the ease of use and straightforwardness of the Dojo library – a very nice finishing touch to all the great experiences accompanying Google Summer of Code.

 
41 Votes

0 Comments

Add Comment


    • >:o
    • :-[
    • :'(
    • :-(
    • :-D
    • :-*
    • :-)
    • :P
    • :\
    • 8-)
    • ;-)



    Click to get a new image.