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 {
    /**
     * Checks current locale settings to select a language which should be used for communication with MCI.
     * 
     * @return Code of language to use for MCI communication
     */
    public static final String getMciLanguageCode() {
        String lowerLanguage = Locale.getDefault().getLanguage().toLowerCase(Locale.US);
        if (lowerLanguage.startsWith("cs") || lowerLanguage.startsWith("sk")) {
            return "cs";
        } else {
            return "en";
        }
    }
}