Google Transliteration component for Salesforce

Wednesday, March 21, 2012 by Aslam - The Alexendra
Hi All,
Recently I had a requirement where client needs easy way to type details in both English/Hindi language in Standard Salesforce screens. For example, there are call center agent users. They use Salesforce Case screen to type whatever detail they get from end customer. Client needs that agent can type details or resolution in both English and Hindi language. So, i come up with one solution here. I used "Google Transliteration" JS API to achieve it and attached this to standard description field for Case Edit screen.

I found this is useful for many others people or developers. So I come up with one common component solution for this. Here is a screen cast you can see this in Action.

How to install:

1) Download the "Google Transliteration Support" Home page component code from here
2) Make one "Narrow Side Bar" html component in your SFDC org and put the code there.
3) Enable this component to Active Home page layout (Make sure it will be visible on all pages in sidebar)
4) Some settings you need to take care (or need to change)

Language: You can see the line of code "google.elements.transliteration.LanguageCode.HINDI". This is the target language. You can change it if you want the native language according to your need.

Field Id: You can see the line of code "opp14". This is the field id of "description" field of Opportunity Edit Screen. You can find the any field id (textarea/text) of the object which you want to make transliteration support. And you need to give that id here.

Extra feature: There is one extra hidden feature here. While you are typing you can toggle between language "Ctrl + g" shortcut keys. But be sure this is not synch with Button on left side (I did not get much time for that, so left that). But this is very convenient for a agent to switch between two language using shortcut keys.

Let me know your thoughts once you able to use it.

Aslam Bari


Mitesh Sura said...

Neat.. can it work for Opportunities and Account fields as well?

Aslam - The Alexendra said...

Yes, It will work for any standard object's , standard field (textarea/textfield).

Anonymous said...

Excellent Work!!!

Abdul Vahid said...

Good and Useful Stuff Aslam.

anshulawesome said...

I am facing a problem.I created a narrow html component and also add it to active home page layout but in left side narrow position showing code in place of button.Why is it happening?????????Can u assist me

Aslam - The Alexendra said...

Hi Anshul,
I think you simply missing a point that, when you copy paste html code in component dont forget to check the checkbox "show html" on top.

Venkata Narasimha Rao Vutla said...

Good Work!

Rajan Chowhan said...

Nice work

Prasanna said...

Simply Awesome!!

Reena said...

Hey Aslam ,

Again good stuff.

Can you please tell me if it is possible to do it for multiple lanuguage too ?
Is is also necessary to put field ID which we want to use for translation or we can generalize this for all text and text area fields?


Aslam - The Alexendra said...

Hi Reena,
Yes as i have set it for Hindi, we can set it for multiple language and also you can set field id for particular text area or field. I have given details in blog , please check.

Reena said...

I dont want to put ID of the field I want it to be generalized for all text and text area fields (I want to apply this on all text and text areas ). Is it necessary to put field Id ?
As per your comment I think it is?

Secoond thing I want to use multiple language at the same time :

Then I will have to use :

And also will need to change script right?

Aslam - The Alexendra said...

Hi Reena,
for language you are right, you can change target language every time on click of some dropdown or button. So need to change code little bit.
Regarding applying this on all text fields, yes, you need to supply all ids in a array like below:

var ids = [ "transl1", "transl2" ];

Krishna said...

hi Aslam,
I created this component for home page layout. but its shown only on home page layout, but its not shown in opportunity page narrow bar. So how to do that?

Aslam - The Alexendra said...

Hi Krishna,
You should go in Setup->Customize->User Interface
There is a checkbox for that for "showing sidebar components on all pages".

Aslam Bari

Ashok Kumar said...

Hi Aslam.. Its really a good finding. Nice work.

Unknown said...

this is really very useful.

thanks for posting.

Vikas gaur said...

Excellence Job..........

Post a Comment