Giter Club home page Giter Club logo

Comments (11)

nagesh-kashyap-r avatar nagesh-kashyap-r commented on August 10, 2024 1

@Stupidman22 @huunhan18pro @CNdev16 I resolved this issue.

You have to create a webview instance (programmatically) and destroy it. (just do it in on create).
Find the helper class in the below link.

https://github.com/YarikSOffice/lingver/blob/master/sample/src/main/java/com/yariksoffice/lingver/WebViewLocaleHelper.kt

Not sure why it behaves like this. but it solved my problem.

Crash happens only if you inflate a webview via XML (first instance).
Not sure, but maybe it is something to do with not refreshing application context after language change.

Please let me know if it resolves your issue.

from localization.

Stupidman22 avatar Stupidman22 commented on August 10, 2024 1

@nagesh-kashyap-r : In my case the webview is Native ads of google. It load in activity first time. I try to using your solution. But it FC. I think I did something wrong :( ...

from localization.

huunhan18pro avatar huunhan18pro commented on August 10, 2024

I also get the same issue. Only for the first time. The library is very good. I could change any language on my app. But I got this issue. Hope you fix it soon. Ver 1.2.10 and Android 7.0

from localization.

nagesh-kashyap-r avatar nagesh-kashyap-r commented on August 10, 2024

@akexorcist i'm facing same issue. App crashes for first time.

from localization.

nagesh-kashyap-r avatar nagesh-kashyap-r commented on August 10, 2024

@akexorcist I found the scenario. if I change locale after retuning a different locale from getDefaultLanguage(base: Context). (for very first time)

from localization.

Stupidman22 avatar Stupidman22 commented on August 10, 2024

any one have solution for this. The same issue here

from localization.

Stupidman22 avatar Stupidman22 commented on August 10, 2024

from localization.

Stupidman22 avatar Stupidman22 commented on August 10, 2024

The problem cause when using web view and override this function at application
override fun getDefaultLanguage(): Locale {
return Locale.getDefault()
}
--> any one try to reproduce and fix issue pls. I think this is critical issue

from localization.

nagesh-kashyap-r avatar nagesh-kashyap-r commented on August 10, 2024

@Stupidman22 I solved the exact same issue by just creating an WebView() object.

Like WebView(context).destroy() ->> in onCreate() of activity

Did you try this?

from localization.

akexorcist avatar akexorcist commented on August 10, 2024

This issue was fixed in 1.2.11. Please check it out

from localization.

akexorcist avatar akexorcist commented on August 10, 2024

Since AndroidX AppCompat has per-app language preferences for backward compatibility. Please migrate this library to AndroidX for more stability, compatibility, and longer support from Google team.

See Migrate to AndroidX guide

Thank you for your support

from localization.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.