Code example for Configuration

0
    private static void setLocale(Locale locale, boolean metric) {
        setLocale(locale, locale, metric);
    } 
 
    private static void setLocale(Locale locale1, Locale locale2, boolean metric) {
        final Configuration config = new Configuration();
        config.locale = locale1;
        final Resources resources = CgeoApplication.getInstance().getResources();
        resources.updateConfiguration(config, resources.getDisplayMetrics());
 
        Locale.setDefault(locale2);
        TestSettings.setUseImperialUnits(!metric);
    } 
}