Base solution for your next web application
Open Closed

Mobile changes language to English #7606


User avatar
0
mika created

Hi

We noticed that our Mobile app changes language to english randomly. We have updated our code with V7.1.0 version. Any adwise how to fix?

Mika


10 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    hi Mika,

    • Which platform ? iOS / Android
    • Which device? Emulator / Real device
    • What's your device language?
    • What's the user language coming from Host?
    • When the language changes, do you see the login screen?

    Write a log here to see if you get CultureNotFoundException https://github.com/aspnetzero/aspnet-zero-core/blob/a99934d7851ff4b55a88d3df1ab9457afd25a9be/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Mobile.Shared/ViewModels/Base/UserConfigurationManager.cs#L101

  • User Avatar
    0
    mika created

    hi alper,

    1. Android
    2. Real device
    3. Finnish
    4. We have added finnish language and it is being used as default language (Host and Tenant)
    5. Language changed randomly when screen was changed. No login screen

    The problem has occured about 5 times and I have not been able to reproduce it but I will set breakpoint there and try if it hits..

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @mika

    Did you find out anything about this ?

  • User Avatar
    0
    mika created

    Hi No. It happens randomly and about 2 times after last edit and both times on my personal phone where I use our released app.

  • User Avatar
    0
    alper created
    Support Team

    if you can save logs (to FireBase or to local device) and send us after this happens, we'll try to figure out the problem.

  • User Avatar
    0
    mika created

    Can you provide more detail what kind of logs you need and where to look for errors beside the "CultureNotFoundException"

  • User Avatar
    0
    alper created
    Support Team

    Add an exception handling to the UserConfigurationManager.GetUserCulture() method. https://github.com/aspnetzero/aspnet-zero-core/blob/a99934d7851ff4b55a88d3df1ab9457afd25a9be/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Mobile.Shared/ViewModels/Base/UserConfigurationManager.cs#L101

    try {
     return new CultureInfo(AppContext.Value.Configuration.Localization.CurrentCulture.Name);
    } catch (CultureNotFoundException ex) {
     ExceptionHandler.LogException(ex); /*--- added this ---*/
     return locale.GetCurrentCultureInfo();
    }
    

    Also send exception logs to FireBase or save it to local device in ExceptionHandler.LogException() method. https://github.com/aspnetzero/aspnet-zero-core/blob/a99934d7851ff4b55a88d3df1ab9457afd25a9be/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Mobile.Shared/Core/Exception/ExceptionHandler.cs#L22

    Send us the exception logs to investigate.

  • User Avatar
    0
    mika created

    Don't know why you closed this.. We use app center and we updated our app last sunday and I have seen one time this since but there was no log in app center.

    Problem still exists and if next time problem happens to me and there is no log in our appcenter account, we need more hepl to pinpoint the problem.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @mika

    This is closed automatically since there was no answer for a long time. I will leave this open and will wait exception logs from your side.

    Thanks,

  • User Avatar
    0
    ismcagdas created
    Support Team

    This issue is closed because of no recent activity. Please open a new issue if you are still having this problem.