Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.Locale;

public class Main {
    public static String getDefaultLocale() {
        switch (Locale.getDefault().getLanguage()) {
        case "zh":
            switch (Locale.getDefault().getCountry()) {
            case "CN":
                return Locale.SIMPLIFIED_CHINESE.toString();
            default:
                return Locale.TRADITIONAL_CHINESE.toString();
            }
        case "ja":
            return Locale.JAPANESE.toString();
        default:
            return Locale.ENGLISH.toString();
        }
    }
}