All languages dropdown box ? RRS feed

  • Question

  • User-1859992688 posted
    I would like to include an "all languages" dropdown box in an ASP.NET 2.0 website (the objective is make statistics on user languages to set up translation priorities). A very unreliable way of doing this would be to list myself all the languages that I know, but I guess that there are more standard ways of achieving such effect.

    Does anyone know how to include an "all languages" dropdown box?

    Thanks in advance,
    Monday, February 6, 2006 3:53 AM

All replies

  • User-1225738063 posted

          ' Displays several properties of the neutral cultures.
          Console.WriteLine("CULTURE ISO ISO WIN DISPLAYNAME                              ENGLISHNAME")
          Dim ci As CultureInfo
          For Each ci In  CultureInfo.GetCultures(CultureTypes.NeutralCultures)
             Console.Write("{0,-7}", ci.Name)
             Console.Write(" {0,-3}", ci.TwoLetterISOLanguageName)
             Console.Write(" {0,-3}", ci.ThreeLetterISOLanguageName)
             Console.Write(" {0,-3}", ci.ThreeLetterWindowsLanguageName)
             Console.Write(" {0,-40}", ci.DisplayName)
             Console.WriteLine(" {0,-40}", ci.EnglishName)
          Next ci


    Tuesday, February 7, 2006 5:33 PM
  • User-1859992688 posted
    Ok, thanks, that's exactly what I needed.

    Wednesday, February 8, 2006 3:38 AM
  • User-158764254 posted

    i use the Languages collection of the Browser object to see what our visitors have set in their browser.

    The first culture code in their list is their perferred language with any subsequent entries representing acceptable but less preferred alternates (in descending order of preference).

    In this way our users do not need to do anything but set their browsers language, and our site will automatically flip to the first language in their list that we have translations for.  In addition to keeping track of which language we rendered the page in, we also keep track of the first language in their list in cases where we didnt have transaltions for it.  This allows us to prioritize the translations.

    So assuming we support en, it, es, pt

    and a person visits out site with their browser configured for


    we would find no matching language in their list and we would serve en
    we would log that fr was their preferred language choice.

    later on, we could count how many people preferred fr and perhaps make arrangements to get the necessary French translations.

    Sunday, February 12, 2006 5:59 PM