Question

I want to add Google Translator in my website. But I want few languages from the collection of languages Google provides Hindi,Punjabi,English Only. I have checked and found Google Provides us an option to choose specific Languages but it does not have option of Punjabi. How can I get Punjabi Option there? As it is coming when I choose all Languages.

Was it helpful?

Solution

The article Translate your website to another language over on CodeProject includes the Punjabi language code ("pa") in it's enumeration of languages so I am making the leap here that if you follow that tutorial you should get Punjabi support.

or using the code generated in the link you provided in the comments you could add pa to the included languages of the code generated i.e.

<div id="google_translate_element"></div><script type="text/javascript">
function googleTranslateElementInit() {
  new google.translate.TranslateElement({
    pageLanguage: 'en', 
    includedLanguages: 'de,fr,hi,it,pa', // <- insert pa here
    layout: google.translate.TranslateElement.InlineLayout.SIMPLE
    }, 'google_translate_element');
}

Note the above is speculative as I have not tested the code but I believe it's highly unlikely that google would drop support for a language.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top