I have already checked the solutions with the wrapper and the other suggestions but it seems too much work for something so simple in the previous api. Actually a way to replace updateConfiguration which was deprecated in api 25 would resolve the issue
Android N change language programatically
Android context.getResources.updateConfiguration() deprecated
Android context.getResources.updateConfiguration() deprecated