In this article, I am going to discuss the language converter in ASP.NET using the free Website Translator plugin of Google. This Google language converter plugin is a very powerful tool which will convert your website content to different languages within fractions of a second. This plugin supports more than 90 languages.
STEP 3: After login, just click (Add to your website now) button. Here's the figure:
STEP 6: Click on
getCode to get the code and copy paste the code where you want to show the Language converter on your website.
It will populate a dropdownlist with nearly 90+ languages in option.
Now, I am pasting it in my website as follows:
- <div>
- <div id="google_translate_element"></div>
- <script type="text/javascript">
- function googleTranslateElementInit() {
- new google.translate.TranslateElement
- ({ pageLanguage: 'en',
- layout: google.translate.TranslateElement.InlineLayout.SIMPLE },
- 'google_translate_element');
- }
- </script><script type="text/javascript"
- src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit">
- </script>
- </div>
Now, here is the HTML code of my UI design.
- <div>
- <table>
- <tr>
- <td>
- Name:
- </td>
- <td>
- <asp:TextBox ID="txt_name" runat="server"></asp:TextBox>
- </td>
- </tr>
- <tr>
- <td>
- Registration No:
- </td>
- <td>
- <asp:TextBox ID="Textxt_regtBox1" runat="server"></asp:TextBox>
- </td>
- </tr>
- <tr>
- <td>
- Country:
- </td>
- <td>
- <asp:TextBox ID="txt_country" runat="server"></asp:TextBox>
- </td>
- </tr>
- </table>
- </div>
head section. - <head runat="server">
- <title></title>
- <meta name="google-translate-customization"
- content="3280487709591956-dc3fc45d489f056a-g5378ebab0cbcd0a4-12"/>
- </head>
div with google_translate_element as follows. Here, I have given the complete code.- <%@ Page Language="C#" AutoEventWireup="true"
- CodeFile="Default.aspx.cs" Inherits="_Default" %>
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <title></title>
- <meta name="google-translate-customization"
- content="3280487709591956-dc3fc45d489f056a-g5378ebab0cbcd0a4-12"/>
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
- <div id="google_translate_element"></div>
- <script type="text/javascript">
- function googleTranslateElementInit() {
- new google.translate.TranslateElement({ pageLanguage: 'en',
- layout: google.translate.TranslateElement.InlineLayout.SIMPLE },
- 'google_translate_element');
- }
- </script><script type="text/javascript"
- src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit">
- </script>
- </div>
- <div id="google_translate_element">
- <table>
- <tr>
- <td>
- Name:
- </td>
- <td>
- <asp:TextBox ID="txt_name"
- runat="server"></asp:TextBox>
- </td>
- </tr>
- <tr>
- <td>
- Registration No:
- </td>
- <td>
- <asp:TextBox ID="Textxt_regtBox1"
- runat="server"></asp:TextBox>
- </td>
- </tr>
- <tr>
- <td>
- Country:
- </td>
- <td>
- <asp:TextBox ID="txt_country"
- runat="server"></asp:TextBox>
- </td>
- </tr>
- </table>
- </div>
- </form>
- </body>
- </html>


gurumurthy jvPosted Apr 4, 2021, 10:53 AM EDT
Is this plugin is not available currently? any alternative for this.
Sujit SahooPosted Jul 2, 2020, 9:17 PM EDT
Currently https://translate.google.com/intl/en/about/website/ not available.
Digambar SonavdekarPosted May 30, 2018, 9:55 PM EDT
I want to make it as onLoad lang change to Hindi, plz help me.
anu vallapureddyPosted Jan 30, 2018, 6:37 AM EST
Hi This artical is good. working fine for mvc application. but reports like csv and print not converting to selcted language. is any body have any idea
Sandeeep LambaPosted Jan 8, 2018, 7:04 AM EST
Hi am new gor MVC, i have to use multilingual for a website..no doubt this above mentioned code is very nice, but i have to use default language Hindi and other language is english only plz help me out
Sonu ChaudharyPosted Feb 29, 2016, 7:46 PM EST
really good artical
Thiru RPosted Feb 29, 2016, 12:22 AM EST
wow. definitely i will try this
Rajeev PunhaniPosted Feb 28, 2016, 11:47 PM EST
Nice
Humayun Kabir MamunPosted Feb 28, 2016, 6:46 PM EST
Nice...
Gowtham KTOP 100Posted Feb 28, 2016, 7:38 AM EST
Good One
Asfend YarPosted Feb 28, 2016, 6:50 AM EST
nice
Ehsan SajjadPosted Feb 28, 2016, 6:26 AM EST
Good man, thanks
Senthil KiumarPosted Feb 27, 2016, 8:04 PM EST
Nice article
Sibeesh VenuTOP 100Posted Feb 27, 2016, 7:23 PM EST
Nice Share
Pankaj Kumar ChoudharyTOP 100Posted Feb 27, 2016, 6:01 PM EST
Nice Information Sir........
Vignesh ManiTOP 100Posted Feb 27, 2016, 12:43 PM EST
Good one
Asfend YarPosted Feb 27, 2016, 9:27 AM EST
nice
Ammar ShaukatPosted Feb 27, 2016, 8:41 AM EST
Good