Google Translate on Page load without dropdown RRS feed

  • Question

  • I have an asp.net site which loads  as subsite inside an iframe on the main Site. 
    I want to transalte this subsite based on the parameters sent(en/es) from the main site to the subsite.
    I am planning to use Google translate when it loads. Is there any way i can pass the language parameters to be translated (en/es) from .cs file to the googleTranslateElementInit() script task.
    I don't want a drop down menu, I just want to convert the website into a specific language when it loads based on the lang parameter sent from the backend. 
    Any good suggestions would be appreciated.
    • Moved by CoolDadTx Tuesday, September 24, 2019 1:50 PM ASP.NET related
    Monday, September 23, 2019 2:37 PM

All replies

  • Google does not want their Translate service to be anonymous.  That is, they don't want you to use the service and not have Google get the credit.  Thus, there will ALWAYS be a drop-down menu with the "Powered by Google Translate" credit.  You can limit the number of languages it will present in the drop-down by using included_languages, but you can't force it to translate directly.

    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Tuesday, September 24, 2019 4:22 AM
  • Please post questions related to web development in the ASP.NET forums.

    Michael Taylor http://www.michaeltaylorp3.net

    Tuesday, September 24, 2019 1:50 PM