Java tutorial
//package com.java2s; //License from project: Apache License import java.util.Locale; public class Main { private static Locale getHindiLocale(Locale[] locale) { Locale defaultLocale = Locale.ENGLISH; for (int i = 0; i < locale.length; i++) { if (locale[i].getLanguage().equals("hi")) { return locale[i]; } } return defaultLocale; } }