0

Can anyone please suggest me how to add translate button in my HTML,CSS website so that the costumer can easily choose the language as their preference.. Please refer the following image.. Refer this image

I am creating a website for the client in French language but I've created the whole website in English language so please enlighten me how I can make it readable by the French users.

  • Here are two questions that have quite a few answers and resources that might help you out: [Adding Google Translate to a web site](https://stackoverflow.com/q/12243818/2898736) [Implementing Google Translate with custom flag icons](https://stackoverflow.com/q/10486833/2898736) – andres Oct 26 '22 at 09:35
  • I would think it's enough to add `` to the top of your document, so that Chrome knows your site is english. The google translate options in the address bar should pop up for non-english browsers. – Kokodoko Oct 26 '22 at 09:42

2 Answers2

0

Just incase, you could use the Google Translate API Reference like this

    <script type ="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
0

you can't add it in the browser address bar but you can add it to your site

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