locked
List of Cultures available RRS feed

  • Question

  • User-995732405 posted
    Is there any way in asp to find out the list of available language cultures that are currently installed with your app? For example, lets say you have resource files for english, german, and french, but on one install i just want english and german and on another i just want english and french. But then i want to have a drop down in the app to allow them to pick the language and the only languages that i want to show up in the drop down are the languages available. So I guess the real question is, is it possible to dynamically discover what resource files are currently present?
    Thursday, March 19, 2009 2:04 PM

Answers

  • User-1136466523 posted

    Hi,

    From your description, it seems that you want to get the run time language list for satellite assemblies that are available, right?

     If so, I suggest that you may try the following documents.

     http://www.sisulizer.com/online-help/RuntimeLanguageChangeNet.htm#LanguageChange

    Here, Sisulizer.Translator is a class that translates forms. Sisulizer.Resources ia a class works with satellite assembly files. Finally Sisulizer.SelectLanguage contains a dialog that show availabel languages and lets the use to select a new language.

    Thanks.

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.<?xml:namespace prefix = o /><o:p></o:p>
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 25, 2009 1:19 AM

All replies

  • User187056398 posted

    From the online help:

    using System;
    using System.Globalization;

    public class SamplesCultureInfo  {

       public static void Main()  {

          // Displays several properties of the neutral cultures.
          Console.WriteLine( "CULTURE ISO ISO WIN DISPLAYNAME                              ENGLISHNAME" );
          foreach ( CultureInfo 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 );
          }

       }

    }

    Thursday, March 19, 2009 2:18 PM
  • User-995732405 posted
    Yes I saw that as well but that gives me a list of all possible neutral cultures that are supported in .Net. I am looking for a list of the available languages. So I have three resource files: Resource.en-US.resx Resource.fr-FR.resx Resource.de-DE.resx So when i build it generates Satellite assemblies for the resources, but say i delete on of the satellite assemblies so it is not there any more. I just want the dropdown to contain the languages for the satellite assemblies that are available. I hope that helps explain it a little better. Thanks!
    Thursday, March 19, 2009 2:45 PM
  • User-1136466523 posted

    Hi,

    From your description, it seems that you want to get the run time language list for satellite assemblies that are available, right?

     If so, I suggest that you may try the following documents.

     http://www.sisulizer.com/online-help/RuntimeLanguageChangeNet.htm#LanguageChange

    Here, Sisulizer.Translator is a class that translates forms. Sisulizer.Resources ia a class works with satellite assembly files. Finally Sisulizer.SelectLanguage contains a dialog that show availabel languages and lets the use to select a new language.

    Thanks.

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.<?xml:namespace prefix = o /><o:p></o:p>
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 25, 2009 1:19 AM