Codehelp
Codehelp

Reputation: 4747

Language Translation in ASP.NET

I have a website in ASP.NET which will be used globally. There is a requirement to provide a language translation option at the home page where the user will be able to select a language and the page(s) will be rendered in that. I have heard of Google translation service but have no idea how to use them. Can anyone provide some links/suggestion that can guide me in this?

Regards.

Upvotes: 0

Views: 1377

Answers (1)

Icarus
Icarus

Reputation: 63956

Follow the instructions here and you'll be good to go, but essentially, all you need to do is include this code:

<div id="google_translate_element"></div><script>
function googleTranslateElementInit() {
  new google.translate.TranslateElement({
    pageLanguage: 'en'
  }, 'google_translate_element');
}
</script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

Into every page that you want to allow the user to be able to translate.

Upvotes: 2

Related Questions