Tag Archives: Transliterate

Using Google Transliterate API with YII

Using Google Transliterate API is straight forward. However to meet the goals of the small project (Webapp for food Catering company) I need to overcome following challenges.

Want to change id of text box (Tablename_fieldname) at will

Google text box id defaults to transliterateTextarea. I was not able to figure out how to change the YII $form object which enforces id of format Tablename_fieldname. I figured out its far more easier to change in the javascript of google to the id which YII requires.


change from



var ids = ["Dish_dish", "Dish_dish2"]


This brings us to the next challenge. I have to add one line for every field attribute I want to transliterate in the main site template page.

Load Google Transliterate API only in the views and not in every page