Hi,

Could anyone provide sample code for going through the locales in
java.util.Locale.getAvailableLocales() and printing them out. I would
like to see a sample that is different than what I am using. I'm sure
there must me several ways to accomplish the task.

This code used to work. I haven't changed anything here, but now it
doesn't work:

Locale[] locales = Locale.getAvailableLocales();
String availableLocales =
    "\nAvailable locales on this user's computer:\n";
for (int i = 0; i < locales.length; i++) {
    // Get the 2-letter language code
    String language = locales[i].getLanguage();
    // Get the 2-letter country code; may be equal to ""
    String country = locales[i].getCountry();
    // Get localized name suitable for display to the user
    String locName = locales[i].getDisplayName();
    if (language.length() == 0)
    {
        language = "  ";
    }
    if (country.length() == 0) {
        country = "   ";
    } else {
        country = "_" + country;
    }
    availableLocales += "Locale Code = " + language + country +
        "  Locale Name = " + locName +"\n";
}
out.println(availableLocales, "oev-enrollment-verification.jsp");

Thanks,
Chuck Coker
Orange, California, United States

--
======================================================================

For the first time since 1976, I have been laid off -- laid off since
31 October 2002. I will pay $100 cash to anyone that can provide me
with a lead that results in a full-time job. The job I'm looking for
would be as a Senior Software Engineer. I can work with most any
modern language (e.g., Java, C++, etc.) and operating system (e.g.,
Windows, Linux, Mac, etc.). You can see my resume at:
http://dev.cokernet.com/jobs/charles.j.coker_resume.php

I've been getting by doing contract work when it's available, but I
really need a full-time job.

Thanks,
Chuck

======================================================================

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
http://forums.java.sun.com
http://www.jspinsider.com

Reply via email to