package com.basgeekball.screenshotsnanny.helper;

import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.util.DisplayMetrics;

import java.util.Locale;

public class LanguageSwitcher {

    private LanguageSwitcher() {
    }

    public static void change(Context context, String language) {
        if (context != null) {
            Resources resources = context.getResources();
            DisplayMetrics displayMetrics = resources.getDisplayMetrics();
            Configuration configuration = resources.getConfiguration();
            configuration.locale = new Locale(language.toLowerCase());
            resources.updateConfiguration(configuration, displayMetrics);
        }
    }

}

@@ -195,32 +195,129 @@
 cs;%0A
-%0Aimport java.util.Locale
+import android.util.Log;%0A%0Aimport java.util.Locale;%0A%0Aimport static com.basgeekball.screenshotsnanny.core.Constants.LOG_TAG
 ;%0A%0Ap
@@ -835,16 +835,95 @@
 trics);%0A
+            Log.i(LOG_TAG, %22%E2%9A%99 Language is set to: %22 + language.toUpperCase());%0A
         

Add log to LanguageSwitcher