locked
How can I change the language of WebView? RRS feed

  • Question

  • User394117 posted

    I want to open every websites with in English language. (no matter the system language) Let me give a simple example. The system language of the user is Turkish. The language chosen by the user in the application settings is German. However, I want the WebView language to remain in English.

    Wednesday, April 22, 2020 8:54 PM

Answers

  • User394117 posted

    @LandLu said: I don't think this is a Xamarin question. You need to ask the support of Google that if they expose API to change the language. And different webpage may have different policies about this.

    I don't need to do this anymore, I'm going the other way. But let me share my guess that maybe someone might need it. The source of each web page has a code like this. (<)html id="facebook" lang="en" dir="ltr" class="__fb-dark-mode"(>) * lang="en" * Maybe you can manipulate this code with AngleSharp or another library and get the result you want. It is just a prediction.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Friday, April 24, 2020 9:10 AM

All replies

  • User369979 posted

    Did the webpage support multi-language? We can't change the webpage's content from the client side. I think this should be the webpage's business which changes its language depending on different conditions.

    Thursday, April 23, 2020 10:08 AM
  • User394117 posted

    @LandLu said: Did the webpage support multi-language? We can't change the webpage's content from the client side. I think this should be the webpage's business which changes its language depending on different conditions.

    Webview opens webpages in system language. I did not ask how to change a content on the client side. The webpage supports all languages, like Google :)

    Thursday, April 23, 2020 11:51 AM
  • User369979 posted

    I don't think this is a Xamarin question. You need to ask the support of Google that if they expose API to change the language. And different webpage may have different policies about this.

    Friday, April 24, 2020 2:43 AM
  • User394117 posted

    @LandLu said: I don't think this is a Xamarin question. You need to ask the support of Google that if they expose API to change the language. And different webpage may have different policies about this.

    I don't need to do this anymore, I'm going the other way. But let me share my guess that maybe someone might need it. The source of each web page has a code like this. (<)html id="facebook" lang="en" dir="ltr" class="__fb-dark-mode"(>) * lang="en" * Maybe you can manipulate this code with AngleSharp or another library and get the result you want. It is just a prediction.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Friday, April 24, 2020 9:10 AM