The problem may be coming from the fact that the boolean Globals.language_changed is static, and therefore when languageCheck is called from the top activity, this boolean becomes false before languageCheck is called from the back activity. You might put in some checks to see if Activit(ies) earlier in the hierarchy are open, and if so keep the boolean set as true in case the user presses the Back button. Another option would be some logic that reloads all open Activities at once when the new locale is selected.
-- EDIT --
On further examination, I don't think this is quite your problem, since you are also updating the boolean in onStart for each activity (I missed this part when I read it the first time). Perhaps the locale changed when one of the Activities higher in the stack changed it, but the Activities lower in the stack just need to refresh. Does an orientation change on one of the lower Activities change it from English to Norwegian?
-- EDIT 2 --
The easiest way to check if that is the problem, would be to add some logging into Globals.checkLocale to see whether or not this conditional statement is true:
if( !config.locale.equals( locale ) )
If that turns out to be the problem, then one possible solution would be to save a local Locale instance in each Activity rather than a global one, and compare to that one. For example, you could grab a Locale instance in each Activity's onCreate method:
myLocale = getBaseContext().getResources().getConfiguration().locale;
Then, instead of calling Globals.checkLocal, just do the following conditional statement (in each Activity's languageCheck method):
if( Globals.locale != null && !Globals.locale.equals( myLocale ) )
{
Configuration config = getBaseContext().getResources().getConfiguration();
config.locale = Globals.locale;
getBaseContext().getResources().updateConfiguration( config, null );
Intent restart = getIntent();
finish();
startActivity( restart );
}
Upon restarting, the Activity's onCreate method would get called again, which would update myLocale to the correct value. This is just a quick solution, not necessarily the best one.. you could expand on this to move some of that code into a method in Globals if you wanted for example, or use a different location than onCreate to get the local Locale instance for each Activity.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…