GNU gettext for Delphi, C++ Builder and Kylix 1.2 beta
<<< Previous | API reference | Next >>>

# procedure GetListOfLanguages (domain:string; list:TStrings);

This procedures searches the directory structure and the embedded translations for any valid translation files for the specified domain. It uses the `bindtextdomain()` directory. The result is a list of language codes that it puts into the list parameter.

It is then up to the programmer to convert these language codes into language names. Example:

    // Put the language codes into a listbox
    ListBox.Items.Clear;
    DefaultInstance.GetListOfLanguages ('default',ListBox.Items);

    // Convert the language names to an English language name using isotolanguagenames.mo
    DefaultInstance.BindtextdomainToFile ('isotolanguagenames',extractfilepath(paramstr(0))+'isotolanguagenames.mo');
    DefaultInstance.TranslateProperties (ListBox,'isotolanguagenames');

    // Translate the English language name to a localized language name
    DefaultInstance.TranslateProperties (ListBox,'languagenames');

<<< Previous | Home | Next >>>
procedure bindtextdomainToFile (Domain,Filename:string); | Up | function GetTranslationProperty (Propertyname:string):WideString;