0

I am developing one application using spring boot and bootstrap. My requirement is I want to change languages as per user requirement. Recently I referred one task in w3sc: Task In this code have script file and so many Integrations internally.

Snippet:

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

When its run without Google access (without internet) not working. Can I Integrate Google translator offline or any alternate solution for integrate google translator in my application?

veer
  • 107
  • 2
  • 13
  • If you put the words "google" and "offline" in the same sentence, the answer is usually "no, never." – Kilves Mar 05 '19 at 12:56
  • @Kilves thanks for quick response. I suppose to say "//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit" or google.translator api kept in the project also not work? there is no provision to workout? – veer Mar 05 '19 at 13:09

1 Answers1

0

No, you can't. If you want your application to be able to translate even without internet, you should prepare translations by your own and use one of many JS libs to support changing language, for example https://www.i18next.com/

Sylwek
  • 856
  • 1
  • 9
  • 24
  • Thankyou. Some of references tell google.translators API's for offline/local server usage. Is it not possible using google.translator client API?.. – veer Mar 14 '19 at 06:12
  • Read this https://stackoverflow.com/questions/41425218/offline-language-translation-api - i think that there is answer to your question – Sylwek Mar 14 '19 at 06:36