Java tutorial
//package com.java2s; //License from project: Open Source License import java.util.Locale; import android.content.Context; import android.content.res.Configuration; import android.content.res.Resources; import android.util.DisplayMetrics; public class Main { public static void setLocale(Context paramContext, Locale paramLocale) { Resources localResources = paramContext.getResources(); Configuration localConfiguration = localResources.getConfiguration(); if (localConfiguration.locale.equals(paramLocale)) { } else { DisplayMetrics localDisplayMetrics = localResources.getDisplayMetrics(); localConfiguration.locale = paramLocale; localResources.updateConfiguration(localConfiguration, localDisplayMetrics); Resources.getSystem().updateConfiguration(localConfiguration, localDisplayMetrics); } } }