Language doesnt change after mx.reload() Javascript action

Hi everyone, I have a Native Mobile app that has a Multi-Language feature where you can translate the current language and then refresh the page so the language change can be seen right away after the refresh. This works perfectly when testing Locally on the Make It Native app. However, once the changes have been deployed to the cloud and the feature is tested on the apk/ipa versions of the app, the refresh does NOTt actually show the new language upon refresh as it should like in the Make It Native app. I have already made sure that I do indeed have the necessary translations imported to their respective languages.   Has anyone come across this before? Any help/feedback would be much appreciated.   Thank you.   Best Regards Kevin
3 answers

Force your native app to reload? You can create a JavaScript action and put in the following code:;


Here’s a useful module for switching language on native. I ran into similar issues as you and was able to solve them by flipping a few extra switches. I don’t recall every detail but hopefully it works for you: 


Update : Resolved the issue by adding another Javascript action to remove the session before the mx.reload() javascript action in the flow as seen below.

JS_RemoveSessionNative :

Based on my experience, this refresh problem seem to only occur on the apk/ipa and not when viewing the app on Make It Native. This resolved my issue that I was having in Mendix 8.12.1. On a side note, after building a test apk app with Mendix 8.18.7 it seems to have resolved itself without the need for the Remove Session Javascript action.

Thanks Rob Funcken on the Mendix Native Mobile slack channel for providing the solution!